[Issue 879] support for --gc-sections
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 4 12:37:00 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=879
--- Comment #15 from Martin Nowak <code at dawg.eu> ---
(In reply to David Nadlinger from comment #14)
> I don't see how pinning the ModuleInfo reference from the ModuleInfo itself
> would work, as there might not be any direct references to the ModuleInfo.
> In fact, unless your module makes calls to _d_array_bounds or so, it's even
> rather unlikely that such a reference that would keep the ModuleInfo alive
> exists. Thus, the global ctor needs to keep the ModuleInfo alive (via the
> .minfo ref), not the other way round.
ModuleInfos are exported global symbols, so the linker should not remove them.
--
More information about the Digitalmars-d-bugs
mailing list