From: Ian Lance Taylor Date: Sat, 15 Mar 1997 02:16:30 +0000 (+0000) Subject: * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4813bbed2b8418f29f37d715bbca01b91200cd74;p=binutils-gdb.git * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is seen with a local symbol, rather than crashing. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 30434369462..c000847e7ac 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Fri Mar 14 16:43:22 1997 Ian Lance Taylor + * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is + seen with a local symbol, rather than crashing. + * elfcode.h (elf_slurp_symbol_table): Don't try to read the version symbols if there aren't any. diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index d0369e55215..f7ae2eae2bb 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -5868,7 +5868,14 @@ mips_elf_check_relocs (abfd, info, sec, relocs) case R_MIPS_CALL_LO16: /* This symbol requires a global offset table entry. */ - BFD_ASSERT (h != NULL); + if (h == NULL) + { + (*_bfd_error_handler) + ("%s: CALL16 reloc at 0x%lx not against global symbol", + bfd_get_filename (abfd), (unsigned long) rel->r_offset); + bfd_set_error (bfd_error_bad_value); + return false; + } /* Make sure this symbol is output as a dynamic symbol. */ if (h->dynindx == -1)