aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-07-31 10:18:46 +0930
committerAlan Modra <amodra@gmail.com>2017-07-31 13:20:44 +0930
commitd44c746aedeb31aacd867edc2da30dedc1e63e15 (patch)
tree2e8e6f68db504b37e84bfc8644321e4ccfc983c5 /bfd
parent93e0a1eab1c7963d77513aa503b129ea03cd6d39 (diff)
downloadfsf-binutils-gdb-d44c746aedeb31aacd867edc2da30dedc1e63e15.zip
fsf-binutils-gdb-d44c746aedeb31aacd867edc2da30dedc1e63e15.tar.gz
fsf-binutils-gdb-d44c746aedeb31aacd867edc2da30dedc1e63e15.tar.bz2
PR 21847, PowerPC64 --plt-localentry again
This makes ld warn about --plt-localentry if a version of glibc without the necessary ld.so checks is detected, and revises the documentation. bfd/ * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry without ld.so checks. gold/ * powerpc.cc (Target_powerpc::scan_relocs): Warn on --plt-localentry without ld.so checks. ld/ * ld.texinfo (plt-localentry): Revise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-ppc.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 41c935d..9839a34 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-31 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
+ without ld.so checks.
+
2017-07-29 Alan Modra <amodra@gmail.com>
PR 21847
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 5f3c79f..7f4f7b6 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -8372,6 +8372,12 @@ ppc64_elf_tls_setup (struct bfd_link_info *info)
--plt-localentry can cause trouble. */
if (htab->params->plt_localentry0 < 0)
htab->params->plt_localentry0 = 0;
+ if (htab->params->plt_localentry0
+ && elf_link_hash_lookup (&htab->elf, "GLIBC_2.26",
+ FALSE, FALSE, FALSE) == NULL)
+ info->callbacks->einfo
+ (_("%P: warning: --plt-localentry is especially dangerous without "
+ "ld.so support to detect ABI violations.\n"));
htab->tls_get_addr = ((struct ppc_link_hash_entry *)
elf_link_hash_lookup (&htab->elf, ".__tls_get_addr",