* elfcode.h (section_from_elf_index): Correct check for invalid

section index.
This commit is contained in:
Ian Lance Taylor 1994-08-12 23:25:23 +00:00
parent 4fb7359d97
commit e9227b4255
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
Fri Aug 12 11:22:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
* elfcode.h (section_from_elf_index): Correct check for invalid
section index.
* elfcode.h (elf_link_add_object_symbols): If there is no symbol
table, try using the dynamic symbol table. From Eric Youngdale
<ericy@cais.cais.com>.

View File

@ -2524,7 +2524,7 @@ section_from_elf_index (abfd, index)
if (index == SHN_COMMON)
return bfd_com_section_ptr;
if (index > elf_elfheader (abfd)->e_shnum)
if (index >= elf_elfheader (abfd)->e_shnum)
return NULL;
{