/* Matsushita 10300 specific support for 32-bit ELF
- Copyright (C) 1996-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* Set the howto pointer for an MN10300 ELF reloc. */
-static void
-mn10300_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+mn10300_info_to_howto (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= R_MN10300_MAX)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised MN10300 reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
- r_type = R_MN10300_NONE;
+ return FALSE;
}
cache_ptr->howto = elf_mn10300_howto_table + r_type;
+ return TRUE;
}
static int
default:
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: Unsupported transition from %s to %s"),
+ (_("%pB: unsupported transition from %s to %s"),
input_bfd,
elf_mn10300_howto_table[r_type].name,
elf_mn10300_howto_table[tls_r_type].name);
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_MN10300_GNU_VTENTRY:
- BFD_ASSERT (h != NULL);
- if (h != NULL
- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
goto fail;
break;
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "unresolvable %s relocation against symbol `%s'"),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
howto->name,
h->root.root.root.string);
}
#endif
#define elf_info_to_howto mn10300_info_to_howto
-#define elf_info_to_howto_rel 0
+#define elf_info_to_howto_rel NULL
#define elf_backend_can_gc_sections 1
#define elf_backend_rela_normal 1
#define elf_backend_check_relocs mn10300_elf_check_relocs