diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-07-05 20:54:57 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-07-05 20:54:57 +0000 |
commit | 6c495350ae7a6db62b04322a88b061d7491677a3 (patch) | |
tree | 9ea0c40d3e4de66a8614d42ce2ce6ec9a8863c86 /bfd/elf32-mips.c | |
parent | 3f8416d5e15b58f47c7f7e0ef94f5aadd9fe22f0 (diff) | |
download | gdb-6c495350ae7a6db62b04322a88b061d7491677a3.zip gdb-6c495350ae7a6db62b04322a88b061d7491677a3.tar.gz gdb-6c495350ae7a6db62b04322a88b061d7491677a3.tar.bz2 |
* elf32-mips.c (mips_elf_object_p): Unconditionally set
elf_bad_symtab, since sometimes the symbol table is messed up and
the last symbol is global.
PR 6921.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r-- | bfd/elf32-mips.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 0ae1065..66f69dd 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -1018,27 +1018,8 @@ mips_elf_object_p (abfd) /* Irix 5 is broken. Object file symbol tables are not always sorted correctly such that local symbols precede global symbols, - and the sh_info field in the symbol table is not always right. - We try to quickly check whether the symbol table is broken for - this BFD, and, if it is, we set elf_bad_symtab in tdata. */ - if (elf_onesymtab (abfd) != 0) - { - Elf_Internal_Shdr *symtab_hdr; - Elf32_External_Sym esym; - - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - if (bfd_seek (abfd, - (symtab_hdr->sh_offset - + symtab_hdr->sh_size - - sizeof (Elf32_External_Sym)), - SEEK_SET) != 0 - || (bfd_read ((PTR) &esym, 1, sizeof (Elf32_External_Sym), abfd) - != sizeof (Elf32_External_Sym))) - return false; - if (ELF_ST_BIND (bfd_h_get_8 (abfd, (bfd_byte *) esym.st_info)) - == STB_LOCAL) - elf_bad_symtab (abfd) = true; - } + and the sh_info field in the symbol table is not always right. */ + elf_bad_symtab (abfd) = true; return true; } |