This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Why does __tls_get_addr call require @PLT for global-dynamic without -fpic?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]