/* Motorola MCore specific support for 32-bit ELF
- Copyright (C) 1994-2018 Free Software Foundation, Inc.
+ Copyright (C) 1994-2019 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: Relocation %s (%d) is not currently supported.\n"),
+ _bfd_error_handler (_("%pB: %s unsupported"),
abfd,
- reloc_entry->howto->name,
- reloc_entry->howto->type);
+ reloc_entry->howto->name);
return bfd_reloc_notsupported;
}
/* Set the howto pointer for a RCE ELF reloc. */
-static void
-mcore_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+mcore_elf_info_to_howto (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= R_MCORE_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised MCore reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
- r_type = R_MCORE_NONE;
+ return FALSE;
}
cache_ptr->howto = mcore_elf_howto_table [r_type];
+ return TRUE;
}
\f
/* The RELOCATE_SECTION function is called by the ELF backend linker
|| ! mcore_elf_howto_table [(int)r_type])
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: Unknown relocation type %d\n"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
if (howto->special_function == mcore_elf_unsupported_reloc)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: Relocation %s (%d) is not currently supported.\n"),
+ _bfd_error_handler (_("%pB: %s unsupported"),
input_bfd,
- howto->name,
- (int)r_type);
+ howto->name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;