diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-09-18 02:39:43 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-09-18 02:39:43 +0000 |
commit | 1f70368c21a866f7379c02da316ae0e2f355d610 (patch) | |
tree | 9f66ae0f8d9e0754cc634684f5dd1c6f8bebe48c /bfd/elfcode.h | |
parent | ed6fb7bdf57feb3050b00774d383e945434b6813 (diff) | |
download | gdb-1f70368c21a866f7379c02da316ae0e2f355d610.zip gdb-1f70368c21a866f7379c02da316ae0e2f355d610.tar.gz 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/elfcode.h')
-rw-r--r-- | bfd/elfcode.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h index eb667eb..7f9ed5f 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -1421,6 +1421,13 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, if (ELF_R_SYM (rela.r_info) == 0) relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; + else if (ELF_R_SYM (rela.r_info) > bfd_get_dynamic_symcount (abfd)) + { + (*_bfd_error_handler) + (_("%s(%s): relocation %d has invalid symbol index %ld"), + abfd->filename, asect->name, i, ELF_R_SYM (rela.r_info)); + relent->sym_ptr_ptr = bfd_abs_section.symbol_ptr_ptr; + } else { asymbol **ps, *s; |