/* Given an ELF reloc, fill in the howto field of a relent. */
-static void
+static bfd_boolean
sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
{
unsigned int r;
|| (r >= R_SH_FIRST_INVALID_RELOC_6 && r <= R_SH_LAST_INVALID_RELOC_6))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: unrecognised SH reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r);
bfd_set_error (bfd_error_bad_value);
- r = R_SH_NONE;
+ return FALSE;
}
cache_ptr->howto = get_howto_table (abfd) + r;
+ return TRUE;
}
\f
/* This function handles relaxing for SH ELF. See the corresponding
if (laddr >= sec->size)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: %#Lx: warning: bad R_SH_USES offset"),
- abfd, irel->r_offset);
+ _bfd_error_handler
+ (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES offset"),
+ abfd, (uint64_t) irel->r_offset);
continue;
}
insn = bfd_get_16 (abfd, contents + laddr);
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
- abfd, irel->r_offset, insn);
+ (_("%pB: %#" PRIx64 ": warning: "
+ "R_SH_USES points to unrecognized insn 0x%x"),
+ abfd, (uint64_t) irel->r_offset, insn);
continue;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: warning: bad R_SH_USES load offset"),
- abfd, irel->r_offset);
+ (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES load offset"),
+ abfd, (uint64_t) irel->r_offset);
continue;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: warning: could not find expected reloc"),
- abfd, paddr);
+ (_("%pB: %#" PRIx64 ": warning: could not find expected reloc"),
+ abfd, (uint64_t) paddr);
continue;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: warning: symbol in unexpected section"),
- abfd, paddr);
+ (_("%pB: %#" PRIx64 ": warning: symbol in unexpected section"),
+ abfd, (uint64_t) paddr);
continue;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: warning: could not find expected COUNT reloc"),
- abfd, paddr);
+ (_("%pB: %#" PRIx64 ": warning: "
+ "could not find expected COUNT reloc"),
+ abfd, (uint64_t) paddr);
continue;
}
if (irelcount->r_addend == 0)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: %#Lx: warning: bad count"),
- abfd, paddr);
+ _bfd_error_handler (_("%pB: %#" PRIx64 ": warning: bad count"),
+ abfd, (uint64_t) paddr);
continue;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: fatal: reloc overflow while relaxing"),
- abfd, irel->r_offset);
+ (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+ abfd, (uint64_t) irel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: fatal: reloc overflow while relaxing"),
- abfd, irel->r_offset);
+ (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+ abfd, (uint64_t) irel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
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 ((p->sec->output_section->flags & SEC_READONLY) != 0)
{
info->flags |= DF_TEXTREL;
- info->callbacks->minfo (_("%B: dynamic relocation in read-only section `%A'\n"),
+ info->callbacks->minfo (_("%pB: dynamic relocation in read-only section `%pA'\n"),
p->sec->owner, p->sec);
}
if ((sym->st_other & STO_SH5_ISA32) != 0)
(*info->callbacks->reloc_dangerous)
(info,
- _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
+ _("unexpected STO_SH5_ISA32 on local symbol is not handled"),
input_bfd, input_section, rel->r_offset);
if (sec != NULL && discarded_section (sec))
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B(%A+%#Lx): %s relocation against SEC_MERGE section"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "%s relocation against SEC_MERGE section"),
input_bfd, input_section,
- rel->r_offset, howto->name);
+ (uint64_t) rel->r_offset, howto->name);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B(%A+%#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.string);
return FALSE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: fatal: unaligned branch target for relax-support relocation"),
+ (_("%pB: %#" PRIx64 ": fatal: "
+ "unaligned branch target for relax-support relocation"),
input_section->owner,
- rel->r_offset);
+ (uint64_t) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: fatal: unaligned %s relocation %#Lx"),
- input_section->owner,
- rel->r_offset, howto->name,
- relocation);
+ (_("%pB: %#" PRIx64 ": fatal: "
+ "unaligned %s relocation %#" PRIx64),
+ input_section->owner, (uint64_t) rel->r_offset,
+ howto->name, (uint64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: fatal: unaligned %s relocation %#Lx"),
+ (_("%pB: %#" PRIx64 ": fatal: "
+ "unaligned %s relocation %#" PRIx64 ""),
input_section->owner,
- rel->r_offset, howto->name,
- relocation);
+ (uint64_t) rel->r_offset, howto->name,
+ (uint64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: fatal: R_SH_PSHA relocation %Ld not in range -32..32"),
+ (_("%pB: %#" PRIx64 ": fatal: R_SH_PSHA relocation %" PRId64
+ " not in range -32..32"),
input_section->owner,
- rel->r_offset,
- relocation);
+ (uint64_t) rel->r_offset,
+ (int64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: %#Lx: fatal: R_SH_PSHL relocation %Ld not in range -32..32"),
+ (_("%pB: %#" PRIx64 ": fatal: R_SH_PSHL relocation %" PRId64
+ " not in range -32..32"),
input_section->owner,
- rel->r_offset,
- relocation);
+ (uint64_t) rel->r_offset,
+ (int64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B(%A+%#Lx): cannot emit fixup to `%s' in read-only section"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "cannot emit fixup to `%s' in read-only section"),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
symname);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B(%A+%#Lx): cannot emit fixup to `%s' in read-only section"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "cannot emit fixup to `%s' in read-only section"),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
symname);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B(%A+%#Lx): %s relocation against external symbol \"%s\""),
- input_bfd, input_section, rel->r_offset, howto->name,
- h->root.root.string);
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "%s relocation against external symbol \"%s\""),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ howto->name, h->root.root.string);
return FALSE;
}
else
&& (old_got_type == GOT_NORMAL || got_type == GOT_NORMAL))
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: `%s' accessed both as normal and FDPIC symbol"),
+ (_("%pB: `%s' accessed both as normal and FDPIC symbol"),
abfd, h->root.root.string);
else if (old_got_type == GOT_FUNCDESC
|| got_type == GOT_FUNCDESC)
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: `%s' accessed both as FDPIC and thread local symbol"),
+ (_("%pB: `%s' accessed both as FDPIC and thread local symbol"),
abfd, h->root.root.string);
else
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: `%s' accessed both as normal and thread local symbol"),
+ (_("%pB: `%s' accessed both as normal and thread local symbol"),
abfd, h->root.root.string);
return FALSE;
}
if (rel->r_addend)
{
_bfd_error_handler
- (_("%B: Function descriptor relocation with non-zero addend"),
+ (_("%pB: Function descriptor relocation with non-zero addend"),
abfd);
return FALSE;
}
if (old_got_type == GOT_NORMAL)
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: `%s' accessed both as normal and FDPIC symbol"),
+ (_("%pB: `%s' accessed both as normal and FDPIC symbol"),
abfd, h->root.root.string);
else
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: `%s' accessed both as FDPIC and thread local symbol"),
+ (_("%pB: `%s' accessed both as FDPIC and thread local symbol"),
abfd, h->root.root.string);
}
}
if (bfd_link_dll (info))
{
_bfd_error_handler
- (_("%B: TLS local exec code cannot be linked into shared objects"),
+ (_("%pB: TLS local exec code cannot be linked into shared objects"),
abfd);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: uses %s instructions while previous modules "
+ (_("%pB: uses %s instructions while previous modules "
"use %s instructions"),
ibfd,
SH_ARCH_SET_HAS_DSP (new_arch) ? "dsp" : "floating point",
if (! sh_merge_bfd_arch (ibfd, info))
{
- _bfd_error_handler (_("%B: uses instructions which are incompatible "
+ _bfd_error_handler (_("%pB: uses instructions which are incompatible "
"with instructions used in previous modules"),
ibfd);
bfd_set_error (bfd_error_bad_value);
if (fdpic_object_p (ibfd) != fdpic_object_p (obfd))
{
- _bfd_error_handler (_("%B: attempt to mix FDPIC and non-FDPIC objects"),
+ _bfd_error_handler (_("%pB: attempt to mix FDPIC and non-FDPIC objects"),
ibfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;