/* POWER/PowerPC XCOFF linker support.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
output file. */
if (info->output_bfd->xvec != abfd->xvec)
{
- (*_bfd_error_handler)
- (_("%s: XCOFF shared object when not producing XCOFF output"),
- bfd_get_filename (abfd));
+ _bfd_error_handler
+ (_("%B: XCOFF shared object when not producing XCOFF output"),
+ abfd);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
lsec = bfd_get_section_by_name (abfd, ".loader");
if (lsec == NULL)
{
- (*_bfd_error_handler)
- (_("%s: dynamic object with no .loader section"),
- bfd_get_filename (abfd));
+ _bfd_error_handler
+ (_("%B: dynamic object with no .loader section"),
+ abfd);
bfd_set_error (bfd_error_no_symbols);
return FALSE;
}
enclosing = xcoff_section_data (abfd, csect)->enclosing;
if (enclosing == NULL)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: `%s' has line numbers but no enclosing section"),
abfd, name);
bfd_set_error (bfd_error_bad_value);
/* Pick up the csect auxiliary information. */
if (sym.n_numaux == 0)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: class %d symbol `%s' has no aux entries"),
abfd, sym.n_sclass, name);
bfd_set_error (bfd_error_bad_value);
switch (smtyp)
{
default:
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: symbol `%s' has unrecognized csect type %d"),
abfd, name, smtyp);
bfd_set_error (bfd_error_bad_value);
|| sym.n_scnum != N_UNDEF
|| aux.x_csect.x_scnlen.l != 0)
{
- (*_bfd_error_handler)
- (_("%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %Ld"),
abfd, name, sym.n_sclass, sym.n_scnum,
aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
if (sym.n_sclass != C_HIDEXT
|| aux.x_csect.x_scnlen.l != 0)
{
- (*_bfd_error_handler)
- (_("%B: XMC_TC0 symbol `%s' is class %d scnlen %d"),
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%B: XMC_TC0 symbol `%s' is class %d scnlen %Ld"),
abfd, name, sym.n_sclass, aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
goto error_return;
|| ((bfd_vma) sym.n_value + aux.x_csect.x_scnlen.l
> enclosing->vma + enclosing->size)))
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: csect `%s' not in enclosing section"),
abfd, name);
bfd_set_error (bfd_error_bad_value);
}
if (bad)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: misplaced XTY_LD `%s'"),
abfd, name);
bfd_set_error (bfd_error_bad_value);
{
if (*rel_csect == NULL)
{
- (*_bfd_error_handler)
- (_("%B: reloc %s:%d not in csect"),
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%B: reloc %s:%Ld not in csect"),
abfd, o->name, i);
bfd_set_error (bfd_error_bad_value);
goto error_return;
FALSE));
if (h == NULL)
{
- (*_bfd_error_handler) (_("%s: no such symbol"), name);
+ _bfd_error_handler (_("%s: no such symbol"), name);
bfd_set_error (bfd_error_no_symbols);
return FALSE;
}
if ((h->flags & XCOFF_EXPORT) != 0
&& (h->flags & XCOFF_WAS_UNDEFINED) != 0)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("warning: attempt to export undefined symbol `%s'"),
h->root.root.string);
return TRUE;
"__rtinit", FALSE, FALSE, TRUE);
if (hsym == NULL)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("error: undefined symbol __rtinit"));
return FALSE;
}
ldrel.l_symndx = 2;
else
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: loader reloc in unrecognized section `%s'"),
reference_bfd, secname);
bfd_set_error (bfd_error_nonrepresentable_section);
{
if (h->ldindx < 0)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: `%s' in loader reloc but not loader sym"),
reference_bfd, h->root.root.string);
bfd_set_error (bfd_error_bad_value);
if (xcoff_hash_table (flinfo->info)->textro
&& strcmp (output_section->name, ".text") == 0)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
+ /* xgettext:c-format */
(_("%B: loader reloc in read-only section %A"),
reference_bfd, output_section);
bfd_set_error (bfd_error_invalid_operation);
/* Make sure that the start of the TOC is also within range. */
if (best_address > toc_start + 0x8000)
{
- (*_bfd_error_handler)
- (_("TOC overflow: 0x%lx > 0x10000; try -mminimal-toc "
+ _bfd_error_handler
+ (_("TOC overflow: %#Lx > 0x10000; try -mminimal-toc "
"when compiling"),
- (unsigned long) (toc_end - toc_start));
+ toc_end - toc_start);
bfd_set_error (bfd_error_file_too_big);
return FALSE;
}
tocoff += h->descriptor->u.toc_offset;
/* The first instruction in the glink code needs to be
- cooked to to hold the correct offset in the toc. The
+ cooked to hold the correct offset in the toc. The
rest are just output raw. */
bfd_put_32 (output_bfd,
bfd_xcoff_glink_code(output_bfd, 0) | (tocoff & 0xffff), p);