aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-mips.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-10-06 17:31:31 +1030
committerAlan Modra <amodra@gmail.com>2021-10-06 18:00:00 +1030
commit1992e26ec4498bdd08fa960b449f6fa29e5759fa (patch)
tree49440bc552d0caffcc651333ac4a555157d1cc36 /bfd/coff-mips.c
parent1808483c2f3f323d8e0398282251a85cd956321b (diff)
downloadgdb-1992e26ec4498bdd08fa960b449f6fa29e5759fa.zip
gdb-1992e26ec4498bdd08fa960b449f6fa29e5759fa.tar.gz
gdb-1992e26ec4498bdd08fa960b449f6fa29e5759fa.tar.bz2
PR28420, ecoff fuzzing failures
PR 28420 * coff-mips.c (mips_adjust_reloc_in): Replace abort with error message and return. * ecoff.c (ecoff_slurp_reloc_table): Remove assertion and aborts, instead handle errors gracefully.
Diffstat (limited to 'bfd/coff-mips.c')
-rw-r--r--bfd/coff-mips.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 963ab24..075dd0b 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -351,7 +351,14 @@ mips_adjust_reloc_in (bfd *abfd,
arelent *rptr)
{
if (intern->r_type > MIPS_R_PCREL16)
- abort ();
+ {
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, intern->r_type);
+ bfd_set_error (bfd_error_bad_value);
+ rptr->howto = NULL;
+ return;
+ }
if (! intern->r_extern
&& (intern->r_type == MIPS_R_GPREL