aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-xgate.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-xgate.c')
-rw-r--r--bfd/elf32-xgate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf32-xgate.c b/bfd/elf32-xgate.c
index 01f39fa..9de5c65 100644
--- a/bfd/elf32-xgate.c
+++ b/bfd/elf32-xgate.c
@@ -422,7 +422,11 @@ xgate_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_XGATE_max);
+ if (r_type >= (unsigned int) R_XGATE_max)
+ {
+ _bfd_error_handler (_("%A: invalid XGate reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = &elf_xgate_howto_table[r_type];
}