/* Set the howto pointer for an Or1k ELF reloc. */
-static void
-or1k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+or1k_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= (unsigned int) R_OR1K_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid OR1K reloc number: %d"), abfd, r_type);
- r_type = 0;
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
cache_ptr->howto = & or1k_elf_howto_table[r_type];
+ return TRUE;
}
/* Addend should be zero. */
if (rel->r_addend != 0)
_bfd_error_handler
- (_("internal error: addend should be zero for R_OR1K_GOT16"));
+ (_("internal error: addend should be zero for %s"),
+ "R_OR1K_GOT16");
break;
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
if ((in_flags & EF_OR1K_NODELAY) != (out_flags & EF_OR1K_NODELAY))
{
_bfd_error_handler
- (_("%pB: EF_OR1K_NODELAY flag mismatch with previous modules"), ibfd);
+ (_("%pB: %s flag mismatch with previous modules"),
+ ibfd, "EF_OR1K_NODELAY");
bfd_set_error (bfd_error_bad_value);
return FALSE;