+2018-04-04 Maciej W. Rozycki <macro@mips.com>
+
+ * elf-hppa.h (elf_hppa_info_to_howto): Also return
+ unsuccessfully for unimplemented relocations.
+ (elf_hppa_info_to_howto_rel): Likewise.
+
2018-04-04 Maciej W. Rozycki <macro@mips.com>
* elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
Elf_Internal_Rela *elf_reloc)
{
unsigned int r_type = ELF32_R_TYPE (elf_reloc->r_info);
+ unsigned int type = r_type;
+ reloc_howto_type *howto;
- if (r_type >= (unsigned int) R_PARISC_UNIMPLEMENTED)
+ if (r_type < (unsigned int) R_PARISC_UNIMPLEMENTED)
+ {
+ howto = &elf_hppa_howto_table[r_type];
+ type = howto->type;
+ }
+ if (type >= (unsigned int) R_PARISC_UNIMPLEMENTED)
{
/* xgettext:c-format */
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
- bfd_reloc->howto = &elf_hppa_howto_table[r_type];
+ bfd_reloc->howto = howto;
return TRUE;
}
Elf_Internal_Rela *elf_reloc)
{
unsigned int r_type = ELF_R_TYPE (elf_reloc->r_info);
+ unsigned int type = r_type;
+ reloc_howto_type *howto;
- if (r_type >= (unsigned int) R_PARISC_UNIMPLEMENTED)
+ if (r_type < (unsigned int) R_PARISC_UNIMPLEMENTED)
+ {
+ howto = &elf_hppa_howto_table[r_type];
+ type = howto->type;
+ }
+ if (type >= (unsigned int) R_PARISC_UNIMPLEMENTED)
{
/* xgettext:c-format */
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
-
- bfd_reloc->howto = &elf_hppa_howto_table[r_type];
+ bfd_reloc->howto = howto;
return TRUE;
}