aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-01-12 16:58:04 +1030
committerAlan Modra <amodra@gmail.com>2018-01-12 21:13:11 +1030
commit87e79a6515951fece72ee08871dd6e112b1042ba (patch)
tree5eb6fdaf187b68aaefffc2d705c9ba307c269751 /bfd/elf64-ppc.c
parent58807c48a5a317ad3e2d39a8755168a3d4d5fdf8 (diff)
downloadgdb-87e79a6515951fece72ee08871dd6e112b1042ba.zip
gdb-87e79a6515951fece72ee08871dd6e112b1042ba.tar.gz
gdb-87e79a6515951fece72ee08871dd6e112b1042ba.tar.bz2
Fixes for "Ignore dynamic references on forced local symbols"
PowerPC64 has its own mark_dynamic_ref, which needs the same change as made by d664fd41e1 to the generic ELF version. Some other targets discard more than just .data, so allow for that too in expected ld messages. bfd/ PR ld/22649 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic references on forced local symbols. ld/ PR ld/22649 * testsuite/ld-elf/pr22649.msg: Allow other messages. * testsuite/ld-elf/shared.exp: Check that --gc-sections is supported before running ld/22649 tests.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index c548fef..d4016b9 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6447,7 +6447,7 @@ ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf)
if ((eh->elf.root.type == bfd_link_hash_defined
|| eh->elf.root.type == bfd_link_hash_defweak)
- && (eh->elf.ref_dynamic
+ && ((eh->elf.ref_dynamic && !eh->elf.forced_local)
|| ((eh->elf.def_regular || ELF_COMMON_DEF_P (&eh->elf))
&& ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL
&& ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN