diff options
author | Alan Modra <amodra@gmail.com> | 2013-01-11 14:09:59 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-01-11 14:09:59 +0000 |
commit | 02be4619f1326faebdf539a45539ba83e689470c (patch) | |
tree | 4203b2174dfb31c95a954ea839f6d4bf207ff457 /bfd/elflink.c | |
parent | a4542f1b2305d1ebb7f9f5e9c88e6af826923452 (diff) | |
download | gdb-02be4619f1326faebdf539a45539ba83e689470c.zip gdb-02be4619f1326faebdf539a45539ba83e689470c.tar.gz gdb-02be4619f1326faebdf539a45539ba83e689470c.tar.bz2 |
* elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
* elf-strtab.c (_bfd_elf_strtab_refcount): New function.
* elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index ee6288a..7861946 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3091,19 +3091,17 @@ elf_add_dt_needed_tag (bfd *abfd, bfd_boolean do_it) { struct elf_link_hash_table *hash_table; - bfd_size_type oldsize; bfd_size_type strindex; if (!_bfd_elf_link_create_dynstrtab (abfd, info)) return -1; hash_table = elf_hash_table (info); - oldsize = _bfd_elf_strtab_size (hash_table->dynstr); strindex = _bfd_elf_strtab_add (hash_table->dynstr, soname, FALSE); if (strindex == (bfd_size_type) -1) return -1; - if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr)) + if (_bfd_elf_strtab_refcount (hash_table->dynstr, strindex) != 1) { asection *sdyn; const struct elf_backend_data *bed; |