/* SuperH SH64-specific support for 32-bit ELF
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
static bfd_boolean sh64_elf_copy_private_data
(bfd *, bfd *);
static bfd_boolean sh64_elf_merge_private_data
- (bfd *, bfd *);
+ (bfd *, struct bfd_link_info *);
static bfd_boolean sh64_elf_fake_sections
(bfd *, Elf_Internal_Shdr *, asection *);
static bfd_boolean sh64_elf_set_private_flags
}
static bfd_boolean
-sh64_elf_merge_private_data (bfd *ibfd, bfd *obfd)
+sh64_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, new_flags;
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
if (bfd_get_arch_size (ibfd) == 32
&& bfd_get_arch_size (obfd) == 64)
+ /* xgettext:c-format */
msg = _("%s: compiled as 32-bit object and %s is 64-bit");
else if (bfd_get_arch_size (ibfd) == 64
&& bfd_get_arch_size (obfd) == 32)
+ /* xgettext:c-format */
msg = _("%s: compiled as 64-bit object and %s is 32-bit");
else
+ /* xgettext:c-format */
msg = _("%s: object size does not match that of target %s");
- (*_bfd_error_handler) (msg, bfd_get_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
/* We don't allow linking in non-SH64 code. */
else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
("%s: uses non-SH64 instructions while previous modules use SH64 instructions",
bfd_get_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
&& h->root.type != bfd_link_hash_indirect))
{
/* Make sure we don't get confused on invalid input. */
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%s: encountered datalabel symbol in input"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value);
&& ((*relocation + rel->r_addend) & 1) == 0)
msg = _("PTA mismatch: a SHcompact address (bit 0 == 0)");
- if (msg != NULL
- && ! ((*info->callbacks->reloc_dangerous)
- (info, msg, abfd, input_section,
- rel->r_offset)))
- return FALSE;
+ if (msg != NULL)
+ (*info->callbacks->reloc_dangerous)
+ (info, msg, abfd, input_section, rel->r_offset);
}
else
{
unknown destination (or when relaxing) will get us here. */
if ((insn & SHMEDIA_PTB_BIT) != 0)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%s: GAS error: unexpected PTB insn with R_SH_PT_16"),
bfd_get_filename (input_section->owner));
return FALSE;
}
if (dropped != 0)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: error: unaligned relocation type %d at %08x reloc %p\n"),
input_section->owner, ELF32_R_TYPE (rel->r_info),
(unsigned) rel->r_offset, relocation);
ld_generated_cranges_size))
{
bfd_set_error (bfd_error_file_truncated);
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%s: could not write out added .cranges entries"),
bfd_get_filename (abfd));
}
cranges_size))
{
bfd_set_error (bfd_error_file_truncated);
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%s: could not write out sorted .cranges entries"),
bfd_get_filename (abfd));
}