aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 6ac3bc6..310b9d6 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -7056,14 +7056,15 @@ dec_dynrel_count (bfd_vma r_info,
void *vpp = &elf_section_data (sec)->local_dynrel;
pp = (struct elf_dyn_relocs **) vpp;
}
-
- /* elf_gc_sweep may have already removed all dyn relocs associated
- with local syms for a given section. Don't report a dynreloc
- miscount. */
- if (*pp == NULL)
- return TRUE;
}
+ /* elf_gc_sweep may have already removed all dyn relocs associated
+ with local syms for a given section. Also, symbol flags are
+ changed by elf_gc_sweep_symbol, confusing the test above. Don't
+ report a dynreloc miscount. */
+ if (*pp == NULL && info->gc_sections)
+ return TRUE;
+
while ((p = *pp) != NULL)
{
if (p->sec == sec)