diff options
author | Alan Modra <amodra@gmail.com> | 2013-01-11 13:55:02 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-01-11 13:55:02 +0000 |
commit | a4542f1b2305d1ebb7f9f5e9c88e6af826923452 (patch) | |
tree | f729d224c08b43f400e7f6e5ac254c3d0234c385 /bfd/elf-strtab.c | |
parent | c2e5e6d74e831490fb9afac70a31c79d38a1f812 (diff) | |
download | gdb-a4542f1b2305d1ebb7f9f5e9c88e6af826923452.zip gdb-a4542f1b2305d1ebb7f9f5e9c88e6af826923452.tar.gz gdb-a4542f1b2305d1ebb7f9f5e9c88e6af826923452.tar.bz2 |
PR ld/12549
* elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
(_bfd_elf_strtab_clear_all_refs): Define.
* elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
(_bfd_elf_strtab_clear_all_refs): Delete.
* elflink.c (elf_link_add_object_symbols): Clear out added
strtab refs. Correct handling of warning common symbols.
Diffstat (limited to 'bfd/elf-strtab.c')
-rw-r--r-- | bfd/elf-strtab.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c index 7d2fad4..1526755 100644 --- a/bfd/elf-strtab.c +++ b/bfd/elf-strtab.c @@ -202,12 +202,10 @@ _bfd_elf_strtab_delref (struct elf_strtab_hash *tab, bfd_size_type idx) } void -_bfd_elf_strtab_clear_all_refs (struct elf_strtab_hash *tab) +_bfd_elf_strtab_clear_refs (struct elf_strtab_hash *tab, bfd_size_type idx) { - bfd_size_type idx; - - for (idx = 1; idx < tab->size; ++idx) - tab->array[idx]->refcount = 0; + while (idx < tab->size) + tab->array[idx++]->refcount = 0; } bfd_size_type |