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.
This commit is contained in:
Alan Modra
2021-10-06 17:31:31 +10:30
parent 1808483c2f
commit 1992e26ec4
2 changed files with 27 additions and 18 deletions

View File

@@ -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