Why does __tls_get_addr call require @PLT for global-dynamic without -fpic?
H.J. Lu
hjl@lucon.org
Mon Aug 13 17:27:00 GMT 2007
Is there a particular reason for x86 and x86-64 global-dynamic TLS
model to require @PLT when calling __tls_get_addr when PIC isn't
required? See
http://sources.redhat.com/bugzilla/show_bug.cgi?id=4918
Right now, gcc doesn't generate PLT when calling __tls_get_addr
without -fpic. Assert in x86/x86-64 linkers fail because of it.
The only thing I can think of is it is used to make sure that it is
a call instruction. I may have missed something. If not, I'd like to
change it to check for R_X86_64_32/R_X86_64_PLT32 and call
__tls_get_addr explicitly.
H.J.
More information about the Libc-alpha
mailing list