aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-m32r.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-m32r.c')
-rw-r--r--bfd/elf32-m32r.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index e6b45ab..5f03e8b 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1280,7 +1280,11 @@ m32r_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
- BFD_ASSERT (ELF32_R_TYPE(dst->r_info) <= (unsigned int) R_M32R_GNU_VTENTRY);
+ if (r_type > (unsigned int) R_M32R_GNU_VTENTRY)
+ {
+ _bfd_error_handler (_("%A: invalid M32R reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = &m32r_elf_howto_table[r_type];
}