From: David Daney Date: Sun, 31 Jul 2005 06:14:15 +0000 (+0000) Subject: * elflink.c (elf_gc_sweep): Set dynsymcount to correct value. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=360156055d6fc3bc84064d4f2c977369fd8ab9c0;p=pf3gnuchains%2Fpf3gnuchains3x.git * elflink.c (elf_gc_sweep): Set dynsymcount to correct value. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ef863dcd6c..957841eb10 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2005-07-30 David Daney + + * elflink.c (elf_gc_sweep): Set dynsymcount to correct value. + 2005-07-29 David Daney * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Ignore _gp_disp diff --git a/bfd/elflink.c b/bfd/elflink.c index 092119aa0b..082b530302 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8943,6 +8943,12 @@ elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook) elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol, &i); + /* There is an unused NULL entry at the head of the table which + we must account for in our count. Unless there weren't any + symbols, which means we'll have no table at all. */ + if (i != 0) + ++i; + elf_hash_table (info)->dynsymcount = i; }