diff options
Diffstat (limited to 'bfd/elfnn-ia64.c')
-rw-r--r-- | bfd/elfnn-ia64.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c index 84b1af1..e6551df 100644 --- a/bfd/elfnn-ia64.c +++ b/bfd/elfnn-ia64.c @@ -197,13 +197,24 @@ static asection *get_pltoff /* Given a ELF reloc, return the matching HOWTO structure. */ -static void +static bfd_boolean elfNN_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) ELFNN_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; } #define PLT_HEADER_SIZE (3 * 16) @@ -3857,6 +3868,12 @@ elfNN_ia64_relocate_section (bfd *output_bfd, } howto = ia64_elf_lookup_howto (r_type); + if (howto == NULL) + { + ret_val = FALSE; + continue; + } + r_symndx = ELFNN_R_SYM (rel->r_info); h = NULL; sym = NULL; |