aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-09-18 02:39:43 +0000
committerDaniel Jacobowitz <drow@false.org>2002-09-18 02:39:43 +0000
commit1f70368c21a866f7379c02da316ae0e2f355d610 (patch)
tree9f66ae0f8d9e0754cc634684f5dd1c6f8bebe48c /bfd/elf.c
parented6fb7bdf57feb3050b00774d383e945434b6813 (diff)
downloadfsf-binutils-gdb-1f70368c21a866f7379c02da316ae0e2f355d610.zip
fsf-binutils-gdb-1f70368c21a866f7379c02da316ae0e2f355d610.tar.gz
fsf-binutils-gdb-1f70368c21a866f7379c02da316ae0e2f355d610.tar.bz2
* bfd-in.h (bfd_get_dynamic_symcount): Define.
* bfd.c (struct _bfd): Add dynsymcount. * bfd-in2.h: Regenerated. * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set abfd->dynsymcount. * elfcode.h (elf_slurp_reloc_table_from_section): Check for overflow.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 7f54909..b8a300e 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5572,7 +5572,11 @@ _bfd_elf_canonicalize_dynamic_symtab (abfd, alocation)
asymbol **alocation;
{
struct elf_backend_data *bed = get_elf_backend_data (abfd);
- return bed->s->slurp_symbol_table (abfd, alocation, true);
+ long symcount = bed->s->slurp_symbol_table (abfd, alocation, true);
+
+ if (symcount >= 0)
+ bfd_get_dynamic_symcount (abfd) = symcount;
+ return symcount;
}
/* Return the size required for the dynamic reloc entries. Any