------- Additional Comments From amodra at bigpond dot net dot au  2008-04-22 
16:10 -------
I'll take a look at ppc.  The obvious change doesn't help much as enabling
ppc_elf_tls_optimize for pie results in us hitting the bfd_error_bad_value at
elf32-ppc.c:6577 when we try to make a dynamic reloc for the edited LD->LE tls
reloc.  That is, if you use an old enough compiler.

gcc 4.2 and later reschedule the tls sequences and ppc_elf_tls_optimize gives
up.  We really need some way of tying together relocs on arg setup for
__tls_get_addr and the call to __tls_get_addr itself.  One way that occurred to
me is to emit a call to the tls variable involved instead of __tls_get_addr, and
of course restore the real call in the linker.  eg. instead of

  addi 3,30,[EMAIL PROTECTED]@tlsld
  bl __tls_get_addr

emit

  addi 3,30,[EMAIL PROTECTED]@tlsld
  bl foo

This would allow the linker to edit the sequence as the tls symbol foo on both
relocs ties things together.  A real call to a tls symbol can't happen, so all
bl some_tls_symbol means bl __tls_get_addr.  Unfortunately this is an ABI 
change.

Alternatively, disable scheduling of tls sequences involving __tls_get_addr in 
gcc.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6443

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to