"Johannes Pfau"  wrote in message news:m5enbm$2t0e$1...@digitalmars.com...

The linker scripts also know about some details of the C/C++ codegen.
For example attribute(constructor) needs support from linker scripts.
(KEEP, SORT_NONE, PROVIDE_HIDDEN or similar) Without this support
constructor calls would be eliminated by these optimization flags as
well. So it's kinda reasonable.

And in theory that C++ support (or the C support) can be abused to prevent moduleinfo stripping by adding dummy references to the moduleinfo from .ctors sections, forcing it to be linked in.

Reply via email to