Fix garbage collection of common symbols for powerpc64
[deliverable/binutils-gdb.git] / bfd / elf64-ppc.c
index f6a8ccb6e5b8e30e7a0f2505f1f421164800e9a7..5a1ee5051904b0ce39a81e15a82405a333ff35a9 100644 (file)
@@ -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
This page took 0.024747 seconds and 4 git commands to generate.