/* MMIX-specific support for 64-bit ELF.
- Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2019 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is part of BFD, the Binary File Descriptor library.
a verbose message. */
*error_message
= _("invalid input relocation when producing"
- " non-ELF, non-mmo format output."
- "\n Please use the objcopy program to convert from"
+ " non-ELF, non-mmo format output;"
+ " please use the objcopy program to convert from"
" ELF or mmo,"
- "\n or assemble using"
+ " or assemble using"
" \"-no-expand\" (for gcc, \"-Wa,-no-expand\"");
mmix_elf_section_data (isec)->has_warned_pushj = TRUE;
return bfd_reloc_dangerous;
a verbose message. */
*error_message
= _("invalid input relocation when producing"
- " non-ELF, non-mmo format output."
- "\n Please use the objcopy program to convert from"
+ " non-ELF, non-mmo format output;"
+ " please use the objcopy program to convert from"
" ELF or mmo,"
- "\n or compile using the gcc-option"
+ " or compile using the gcc-option"
" \"-mno-base-addresses\".");
mmix_elf_section_data (isec)->has_warned_bpo = TRUE;
return bfd_reloc_dangerous;
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: Internal inconsistency error for value for\n\
- linker-allocated global register: linked: %#Lx != relaxed: %#Lx"),
+ linker-allocated global register: linked: %#" PRIx64 " != relaxed: %#" PRIx64 ""),
isec->owner,
- value,
- gregdata->reloc_request[bpo_index].value);
+ (uint64_t) value,
+ (uint64_t) gregdata->reloc_request[bpo_index].value);
bfd_set_error (bfd_error_bad_value);
return bfd_reloc_overflow;
}
/* Set the howto pointer for an MMIX ELF reloc (type RELA). */
-static void
-mmix_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+mmix_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_MMIX_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid MMIX 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 = &elf_mmix_howto_table[r_type];
+ return TRUE;
}
/* Any MMIX-specific relocation gets here at assembly time or when linking
/* FIXME: Better error message. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: LOCAL directive: Register $%Ld is not a local register."
- " First global register is $%Ld."),
- input_section->owner, srel, first_global);
+ (_("%pB: LOCAL directive: "
+ "register $%" PRId64 " is not a local register;"
+ " first global register is $%" PRId64),
+ input_section->owner, (int64_t) srel, (int64_t) first_global);
return bfd_reloc_overflow;
}
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_MMIX_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))
return FALSE;
break;
}
h->u.def.section->owner is NULL. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: Error: multiple definition of `%s'; start of %s "
- "is set in a earlier linked file\n"),
+ (_("%pB: error: multiple definition of `%s'; start of %s "
+ "is set in a earlier linked file"),
abfd, *namep,
*namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX));
bfd_set_error (bfd_error_bad_value);
{
/* FIXME: Pass error state gracefully. */
if (bfd_get_section_flags (abfd, reg_section) & SEC_HAS_CONTENTS)
- _bfd_abort (__FILE__, __LINE__, _("Register section has contents\n"));
+ _bfd_abort (__FILE__, __LINE__, _("register section has contents\n"));
/* Really remove the section, if it hasn't already been done. */
if (!bfd_section_removed_from_list (abfd, reg_section))
{
_bfd_error_handler
/* xgettext:c-format */
- (_("Internal inconsistency: remaining %lu != max %lu.\n\
- Please report this bug."),
+ (_("internal inconsistency: remaining %lu != max %lu;"
+ " please report this bug"),
(unsigned long) gregdata->n_remaining_bpo_relocs_this_relaxation_round,
(unsigned long) gregdata->n_bpo_relocs);
return FALSE;