dmd (v2.075.0): fully static linking: undefined reference to `__tls_get_addr'

Joakim via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 19 09:13:29 PDT 2017


On Saturday, 19 August 2017 at 14:22:21 UTC, kdevel wrote:
> On Saturday, 19 August 2017 at 14:07:49 UTC, kdevel wrote:
>> src/rt/sections_elf_shared.d:(.text._D2rt19sections_elf_shared11getTLSRangeFNbNimmZAv[_D2rt19sections_elf_shared11getTLSRangeFNbNimmZAv]+0x38): undefined reference to `__tls_get_addr'
>
> https://issues.dlang.org/show_bug.cgi?id=12268

That function is supposed to be provided by the dynamic linker 
when running your program, but I'm guessing -static makes the 
linker check for all symbols at link-time, not allowing such 
deferred linking.  It looks like dmd or druntime doesn't support 
such full static linking yet, as they assume that function will 
be there.


More information about the Digitalmars-d-learn mailing list