/* Or1k-specific support for 32-bit ELF.
- Copyright (C) 2001-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 Free Software Foundation, Inc.
Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org
PIC parts added by Stefan Kristiansson, stefan.kristiansson@saunalahti.fi,
/* 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 (_("%B: 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;
{
BFD_FAIL ();
_bfd_error_handler
- (_("%B: probably compiled without -fPIC?"),
+ (_("%pB: probably compiled without -fPIC?"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
/* TODO: implement support for local dynamic. */
BFD_FAIL ();
_bfd_error_handler
- (_("%B: support for local dynamic not implemented"),
+ (_("%pB: support for local dynamic not implemented"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
be used as linker input. */
BFD_FAIL ();
_bfd_error_handler
- (_("%B: will not resolve runtime TLS relocation"),
+ (_("%pB: will not resolve runtime TLS relocation"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: bad relocation section name `%s\'"),
+ (_("%pB: bad relocation section name `%s\'"),
abfd, name);
}
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%B: dynamic relocation against `%T' in read-only section `%A'\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
- (_("%B: 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;