diff options
Diffstat (limited to 'bfd/elf64-ia64-vms.c')
-rw-r--r-- | bfd/elf64-ia64-vms.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index 07597ba97b5..bc66b17bf63 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -240,13 +240,24 @@ static asection *get_got /* Given a ELF reloc, return the matching HOWTO structure. */ -static void +static bfd_boolean elf64_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { - bfd_reloc->howto - = ia64_elf_lookup_howto ((unsigned int) ELF64_R_TYPE (elf_reloc->r_info)); + unsigned int r_type = ELF32_R_TYPE (elf_reloc->r_info); + + bfd_reloc->howto = ia64_elf_lookup_howto (r_type); + if (bfd_reloc->howto == NULL) + { + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: unsupported relocation type %#x"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + + return TRUE; } @@ -3434,6 +3445,11 @@ elf64_ia64_relocate_section (bfd *output_bfd, } howto = ia64_elf_lookup_howto (r_type); + if (howto == NULL) + { + ret_val = FALSE; + continue; + } r_symndx = ELF64_R_SYM (rel->r_info); h = NULL; sym = NULL; |