diff options
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r-- | bfd/elf64-alpha.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 0ffe3fa..8f64114 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1105,7 +1105,14 @@ elf64_alpha_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned r_type = ELF64_R_TYPE(dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_ALPHA_max); + + if (r_type >= R_ALPHA_max) + { + (*_bfd_error_handler) (_("%A: unrecognised Alpha reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_ALPHA_NONE; + } cache_ptr->howto = &elf64_alpha_howto_table[r_type]; } |