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