PR 21847, Don't default PowerPC64 to --plt-localentry
authorAlan Modra <amodra@gmail.com>
Sat, 29 Jul 2017 03:03:35 +0000 (12:33 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 29 Jul 2017 03:32:27 +0000 (13:02 +0930)
commit8b5f1ed8777df405f3c7b87472b1506f5125aebe
treefe5af9f4c9fd47c2ee17365ddc456e86661f0f47
parentef080e7ed4a373037231e709bfa1a909f4eae0f9
PR 21847, Don't default PowerPC64 to --plt-localentry

The big comment in ppc64_elf_tls_setup says why.  I've also added some
code to the bfd linker that catches the -lpthread -lc symbol
differences and disable generation of optimized call stubs even when
--plt-localentry is activated.  Gold doesn't yet have that.

PR 21847
bfd/
* elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
(ppc64_elf_merge_symbol): Set non_zero_localentry.
(is_elfv2_localentry0): Test non_zero_localentry.
(ppc64_elf_tls_setup): Default to --no-plt-localentry.
gold/
* powerpc.cc (Target_powerpc::scan_relocs): Default to
--no-plt-localentry.
ld/
* ld.texinfo (plt-localentry): Document.
bfd/ChangeLog
bfd/elf64-ppc.c
gold/ChangeLog
gold/powerpc.cc
ld/ChangeLog
ld/ld.texinfo