diff options
author | Alan Modra <amodra@gmail.com> | 2013-02-01 11:06:37 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-02-01 11:06:37 +0000 |
commit | c57da1a761a4d7bc0191a9ef568f793296920606 (patch) | |
tree | 5238efbc77af1304ccdc5d90e2757e26a6d90b5f | |
parent | 73203c749523fd70d355b67bf397a93e302eca32 (diff) | |
download | gdb-c57da1a761a4d7bc0191a9ef568f793296920606.zip gdb-c57da1a761a4d7bc0191a9ef568f793296920606.tar.gz gdb-c57da1a761a4d7bc0191a9ef568f793296920606.tar.bz2 |
* elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
clears def_regular.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 470ecb9..7614ca0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-02-01 Alan Modra <amodra@gmail.com> + + * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol + clears def_regular. + 2013-01-31 Tristan Gingold <gingold@adacore.com> * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections 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) |