aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-01-20 11:06:28 +1030
committerAlan Modra <amodra@gmail.com>2015-01-20 11:12:34 +1030
commit1c9177d9a5c3e06d3344347c8068acfb7d8ecc8b (patch)
treefed262fb285217ad5cce16547e849f921629759d /bfd/elf64-ppc.c
parent3cd0754799953aae30394173c0545c52c5f17481 (diff)
downloadgdb-1c9177d9a5c3e06d3344347c8068acfb7d8ecc8b.zip
gdb-1c9177d9a5c3e06d3344347c8068acfb7d8ecc8b.tar.gz
gdb-1c9177d9a5c3e06d3344347c8068acfb7d8ecc8b.tar.bz2
Fix garbage collection of common symbols for powerpc64
I forgot powerpc64 has its own gc_mark_dynamic_ref. PR ld/17615 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop ELF_COMMON_DEF syms.
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 f6a8ccb..5a1ee50 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6232,7 +6232,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.def_regular
+ || ((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
&& (!info->executable