ld --gc-sections fail with __tls_get_addr_opt
authorAlan Modra <amodra@gmail.com>
Wed, 11 May 2016 12:24:05 +0000 (21:54 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 11 May 2016 13:10:09 +0000 (22:40 +0930)
commit3bd43ebcb6025a8a43f119238f490e2e238697a2
tree8f23db6516221776375d577ae78f6e3a145c69e5
parenta6684f0dddb292873f962dc36b20e6db00ef6b09
ld --gc-sections fail with __tls_get_addr_opt

When --gc-sections is active, __tls_get_addr_opt is marked as not
needed and forced local before ppc*_elf_tls_setup is run.

bfd/
PR 20060
* elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
* elf32-ppc.c (ppc_elf_tls_setup): Likewise.
ld/
PR 20060
* testsuite/ld-powerpc/powerpc.exp: Run new tests.
* testsuite/ld-powerpc/tlsdll.s: New.
* testsuite/ld-powerpc/tlsdll.ver: New.
* testsuite/ld-powerpc/tlsdll_32.s: New.
* testsuite/ld-powerpc/tlsopt5.d: New.
* testsuite/ld-powerpc/tlsopt5.s: New.
* testsuite/ld-powerpc/tlsopt5_32.d: New.
* testsuite/ld-powerpc/tlsopt5_32.s: New.
12 files changed:
bfd/ChangeLog
bfd/elf32-ppc.c
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/powerpc.exp
ld/testsuite/ld-powerpc/tlsdll.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/tlsdll.ver [new file with mode: 0644]
ld/testsuite/ld-powerpc/tlsdll_32.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/tlsopt5.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/tlsopt5.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/tlsopt5_32.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/tlsopt5_32.s [new file with mode: 0644]