[Issue 13178] Duplicate symbol of compiler generated symbols

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 4 09:41:12 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13178

--- Comment #12 from Dicebot <public at dicebot.lv> ---
Depends on the (In reply to Jacob Carlborg from comment #11)
> Shouldn't the linker only search for undefined symbols in libraries? If rdmd
> compiled Tango it shouldn't need to search any symbols.

It does. But when it searches for undefined symbol it finds two definitions in
the text section - one in local object files and one in static library. Static
libraries are really nothing but just collection of object files packaged
together and are processed by linker in a same way. At this point of time there
is no "application vs library" distinction, just many object files to merge
into single binary. This is not something D can affect.

Linker can ignore duplicates for weak symbols ('W' in nm output, usually done
for templates) but those are considerably slower to process.

--


More information about the Digitalmars-d-bugs mailing list