diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-03-15 02:16:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-03-15 02:16:30 +0000 |
commit | 4813bbed2b8418f29f37d715bbca01b91200cd74 (patch) | |
tree | 3b96c28221b3d3e3356044c00579bf059519a737 /bfd | |
parent | 46a92fde532aec31ad31edda66fc7d79a459f75d (diff) | |
download | gdb-4813bbed2b8418f29f37d715bbca01b91200cd74.zip gdb-4813bbed2b8418f29f37d715bbca01b91200cd74.tar.gz gdb-4813bbed2b8418f29f37d715bbca01b91200cd74.tar.bz2 |
* elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
seen with a local symbol, rather than crashing.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 3 | ||||
-rw-r--r-- | bfd/elf32-mips.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3043436..c000847 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Fri Mar 14 16:43:22 1997 Ian Lance Taylor <ian@cygnus.com> + * 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 d0369e5..f7ae2ea 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) |