diff options
Diffstat (limited to 'bfd/elf32-moxie.c')
-rw-r--r-- | bfd/elf32-moxie.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c index 1f685b9..56c054b 100644 --- a/bfd/elf32-moxie.c +++ b/bfd/elf32-moxie.c @@ -131,7 +131,11 @@ moxie_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_MOXIE_max); + if (r_type >= (unsigned int) R_MOXIE_max) + { + _bfd_error_handler (_("%A: invalid Moxie reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & moxie_elf_howto_table [r_type]; } |