From: Ian Lance Taylor Date: Wed, 5 Jul 1995 20:54:57 +0000 (+0000) Subject: * elf32-mips.c (mips_elf_object_p): Unconditionally set X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c495350ae7a6db62b04322a88b061d7491677a3;p=binutils-gdb.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f83f58cb0d2..615cccda8e1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ Wed Jul 5 10:31:47 1995 Ian Lance Taylor + * 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. + * ecoff.c (_bfd_ecoff_bfd_is_local_label): New function. * libecoff.h (_bfd_ecoff_bfd_is_local_label): Declare. * elf32-mips.c (mips_elf_is_local_label): New static function. diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 0ae106572ff..66f69ddf91a 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; }