From: Alan Modra Date: Tue, 20 Jan 2015 00:36:28 +0000 (+1030) Subject: Fix garbage collection of common symbols for powerpc64 X-Git-Tag: binutils-2_25_1~229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1b7d37c0d6bd15b1a154aef0c764a4350dd0f22;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0300b59f7c7..cba389e715f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,6 +1,11 @@ 2015-02-11 Alan Modra Apply from master. + 2015-01-20 Alan Modra + PR ld/17615 + * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop + ELF_COMMON_DEF syms. + 2015-01-19 Alan Modra PR 17165 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 88ae80c77cc..318f41a0ac2 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