public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Why does __tls_get_addr call require @PLT for global-dynamic  without -fpic?
@ 2007-08-13 17:27 H.J. Lu
  2007-08-14 19:22 ` PATCH: PR ld/4918: ___tls_get_addr call requires @PLT for global-dynamic even without -fpic H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2007-08-13 17:27 UTC (permalink / raw)
  To: binutils, gcc, GNU C Library

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-14 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-13 17:27 Why does __tls_get_addr call require @PLT for global-dynamic without -fpic? H.J. Lu
2007-08-14 19:22 ` PATCH: PR ld/4918: ___tls_get_addr call requires @PLT for global-dynamic even without -fpic H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).