aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2005-07-31 06:14:15 +0000
committerDavid Daney <ddaney@avtrex.com>2005-07-31 06:14:15 +0000
commit1b9ee6a2f0ff431cced5f27b28a2a9094abe7ae7 (patch)
treee6163dfba2dbad338cbc74fc9329000157542a54 /bfd/elflink.c
parent409a795dc38fd7c1ef013d8c9d1a527e56cc7a62 (diff)
downloadbinutils-1b9ee6a2f0ff431cced5f27b28a2a9094abe7ae7.zip
binutils-1b9ee6a2f0ff431cced5f27b28a2a9094abe7ae7.tar.gz
binutils-1b9ee6a2f0ff431cced5f27b28a2a9094abe7ae7.tar.bz2
* elflink.c (elf_gc_sweep): Set dynsymcount to correct value.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 092119a..082b530 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;
}