diff options
author | Alan Modra <amodra@gmail.com> | 2016-05-11 21:54:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-05-11 22:40:09 +0930 |
commit | 3bd43ebcb6025a8a43f119238f490e2e238697a2 (patch) | |
tree | 8f23db6516221776375d577ae78f6e3a145c69e5 /bfd/elf32-ppc.c | |
parent | a6684f0dddb292873f962dc36b20e6db00ef6b09 (diff) | |
download | fsf-binutils-gdb-3bd43ebcb6025a8a43f119238f490e2e238697a2.zip fsf-binutils-gdb-3bd43ebcb6025a8a43f119238f490e2e238697a2.tar.gz fsf-binutils-gdb-3bd43ebcb6025a8a43f119238f490e2e238697a2.tar.bz2 |
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.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 369a5e6..f3e5e42 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -5164,6 +5164,7 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) tga->root.type = bfd_link_hash_indirect; tga->root.u.i.link = &opt->root; ppc_elf_copy_indirect_symbol (info, opt, tga); + opt->forced_local = 0; if (opt->dynindx != -1) { /* Use __tls_get_addr_opt in dynamic relocations. */ |