functions rather than warning callback or _bfd_error_handler.
* elf32-ppc.c: Likewise.
* elf64-ppc.c: Likewise.
* elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
arg error.
* elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
+2011-05-23 Alan Modra <amodra@gmail.com>
+
+ * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
+ functions rather than warning callback or _bfd_error_handler.
+ * elf32-ppc.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
+ arg error.
+ * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
+
2011-05-23 Alan Modra <amodra@gmail.com>
PR 12763
/* FRV-specific support for 32-bit ELF.
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
osec, sym,
rel->r_addend))
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%x): relocation to `%s+%x' may have caused the error above"),
+ info->callbacks->einfo
+ (_("%H: relocation to `%s+%v'"
+ " may have caused the error above\n"),
input_bfd, input_section, rel->r_offset, name, rel->r_addend);
return FALSE;
}
picrel = NULL;
if (h && ! FRVFDPIC_SYM_LOCAL (info, h))
{
- info->callbacks->warning
- (info, _("relocation references symbol not defined in the module"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: relocation references symbol"
+ " not defined in the module\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
break;
/* Is this a call instruction? */
if ((insn & (unsigned long)0x01fc0000) != 0x003c0000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GETTLSOFF not applied to a call instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GETTLSOFF not applied to a call instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this an lddi instruction? */
if ((insn & (unsigned long)0x01fc0000) != 0x00cc0000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GOTTLSDESC12 not applied to an lddi instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GOTTLSDESC12"
+ " not applied to an lddi instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this a sethi instruction? */
if ((insn & (unsigned long)0x01ff0000) != 0x00f80000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GOTTLSDESCHI not applied to a sethi instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GOTTLSDESCHI"
+ " not applied to a sethi instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this a setlo or setlos instruction? */
if ((insn & (unsigned long)0x01f70000) != 0x00f40000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GOTTLSDESCLO"
- " not applied to a setlo or setlos instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GOTTLSDESCLO"
+ " not applied to a setlo or setlos instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this an ldd instruction? */
if ((insn & (unsigned long)0x01fc0fc0) != 0x00080140)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_TLSDESC_RELAX not applied to an ldd instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_TLSDESC_RELAX"
+ " not applied to an ldd instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this a calll or callil instruction? */
if ((insn & (unsigned long)0x7ff80fc0) != 0x02300000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GETTLSOFF_RELAX"
- " not applied to a calll instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GETTLSOFF_RELAX"
+ " not applied to a calll instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this an ldi instruction? */
if ((insn & (unsigned long)0x01fc0000) != 0x00c80000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GOTTLSOFF12 not applied to an ldi instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GOTTLSOFF12"
+ " not applied to an ldi instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this a sethi instruction? */
if ((insn & (unsigned long)0x01ff0000) != 0x00f80000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GOTTLSOFFHI not applied to a sethi instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GOTTLSOFFHI"
+ " not applied to a sethi instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this a setlo or setlos instruction? */
if ((insn & (unsigned long)0x01f70000) != 0x00f40000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_GOTTLSOFFLO"
- " not applied to a setlo or setlos instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_GOTTLSOFFLO"
+ " not applied to a setlo or setlos instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this an ld instruction? */
if ((insn & (unsigned long)0x01fc0fc0) != 0x00080100)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_TLSOFF_RELAX not applied to an ld instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_TLSOFF_RELAX"
+ " not applied to an ld instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this a sethi instruction? */
if ((insn & (unsigned long)0x01ff0000) != 0x00f80000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_TLSMOFFHI not applied to a sethi instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_TLSMOFFHI"
+ " not applied to a sethi instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
/* Is this a setlo or setlos instruction? */
if ((insn & (unsigned long)0x01f70000) != 0x00f40000)
{
- r = info->callbacks->warning
- (info,
- _("R_FRV_TLSMOFFLO"
- " not applied to a setlo or setlos instruction"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("R_FRV_TLSMOFFLO"
+ " not applied to a setlo or setlos instruction\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
{
if (addend)
{
- info->callbacks->warning
- (info, _("R_FRV_FUNCDESC references dynamic symbol with nonzero addend"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_FUNCDESC references dynamic symbol"
+ " with nonzero addend\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
dynindx = h->dynindx;
input_section
->output_section))
{
- info->callbacks->warning
- (info,
- _("cannot emit fixups in read-only section"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: cannot emit fixups"
+ " in read-only section\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
input_section
->output_section))
{
- info->callbacks->warning
- (info,
- _("cannot emit dynamic relocations in read-only section"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: cannot emit dynamic relocations"
+ " in read-only section\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
{
if (addend && r_type == R_FRV_FUNCDESC_VALUE)
{
- info->callbacks->warning
- (info, _("R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: R_FRV_FUNCDESC_VALUE"
+ " references dynamic symbol with nonzero addend\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
dynindx = h->dynindx;
input_section
->output_section))
{
- info->callbacks->warning
- (info,
- _("cannot emit fixups in read-only section"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: cannot emit fixups in read-only section\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
if (!h || h->root.type != bfd_link_hash_undefweak)
input_section
->output_section))
{
- info->callbacks->warning
- (info,
- _("cannot emit dynamic relocations in read-only section"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: cannot emit dynamic relocations"
+ " in read-only section\n"),
+ input_bfd, input_section, rel->r_offset);
return FALSE;
}
&& !(picrel && picrel->symndx == -1
&& picrel->d.h->root.type == bfd_link_hash_undefined))
{
- if (info->shared || info->pie)
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): reloc against `%s': %s"),
- input_bfd, input_section, (long)rel->r_offset, name,
- _("relocation references a different segment"));
- else
- info->callbacks->warning
- (info,
- _("relocation references a different segment"),
- name, input_bfd, input_section, rel->r_offset);
+ info->callbacks->einfo
+ (_("%H: reloc against `%s' references a different segment\n"),
+ input_bfd, input_section, rel->r_offset, name);
}
if (!silence_segment_error && (info->shared || info->pie))
return FALSE;
if (msg)
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): reloc against `%s': %s"),
- input_bfd, input_section, (long)rel->r_offset, name, msg);
+ info->callbacks->einfo
+ (_("%H: reloc against `%s': %s\n"),
+ input_bfd, input_section, rel->r_offset, name, msg);
return FALSE;
}
!= (frvfdpic_gotfixup_section (info)->reloc_count * 4))
{
error:
- (*_bfd_error_handler)
- ("LINKER BUG: .rofixup section size mismatch");
+ info->callbacks->einfo
+ ("LINKER BUG: .rofixup section size mismatch\n");
return FALSE;
}
default:
bad_reloc:
- (*_bfd_error_handler)
- (_("%B: unsupported relocation type %i"),
+ info->callbacks->einfo
+ (_("%B: unsupported relocation type %i\n"),
abfd, ELF32_R_TYPE (rel->r_info));
return FALSE;
}
/* PowerPC-specific support for 32-bit ELF
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
{
/* It does not make sense to have a procedure linkage
table entry for a local symbol. */
- (*_bfd_error_handler) (_("%B(%A+0x%lx): %s reloc against "
- "local symbol"),
- abfd,
- sec,
- (long) rel->r_offset,
- ppc_elf_howto_table[r_type]->name);
+ info->callbacks->einfo (_("%H: %s reloc against local symbol\n"),
+ abfd, sec, rel->r_offset,
+ ppc_elf_howto_table[r_type]->name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
&& !expecting_tls_get_addr
&& is_branch_reloc (r_type))
{
- info->callbacks->minfo ("%C __tls_get_addr lost arg, "
+ info->callbacks->minfo ("%H __tls_get_addr lost arg, "
"TLS optimization disabled\n",
ibfd, sec, rel->r_offset);
if (elf_section_data (sec)->relocs != relstart)
could just mark this symbol to exclude it
from tls optimization but it's safer to skip
the entire optimization. */
- info->callbacks->minfo (_("%C arg lost __tls_get_addr, "
+ info->callbacks->minfo (_("%H arg lost __tls_get_addr, "
"TLS optimization disabled\n"),
ibfd, sec, rel->r_offset);
if (elf_section_data (sec)->relocs != relstart)
if (h->size == 0)
{
- (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
- h->root.root.string);
+ info->callbacks->einfo (_("dynamic variable `%s' is zero size\n"),
+ h->root.root.string);
return TRUE;
}
switch (r_type)
{
default:
- (*_bfd_error_handler)
- (_("%B: unknown relocation type %d for symbol %s"),
+ info->callbacks->einfo
+ (_("%B: unknown relocation type %d for symbol %s\n"),
input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
generated by a hash table traversal, the value in the
got at entry m+n bears little relation to the entry m. */
if (addend != 0)
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): non-zero addend on %s reloc against `%s'"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ info->callbacks->einfo
+ (_("%H: non-zero addend on %s reloc against `%s'\n"),
+ input_bfd, input_section, rel->r_offset,
howto->name,
sym_name);
}
non-executable to apply text relocations.
So we'll segfault when trying to run the
indirection function to resolve the reloc. */
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): relocation %s for indirect "
- "function %s unsupported"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ info->callbacks->einfo
+ (_("%H: relocation %s for indirect "
+ "function %s unsupported\n"),
+ input_bfd, input_section, rel->r_offset,
howto->name,
sym_name);
ret = FALSE;
|| (CONST_STRNEQ (name, ".sbss")
&& (name[5] == 0 || name[5] == '.'))))
{
- (*_bfd_error_handler)
+ info->callbacks->einfo
(_("%B: the target (%s) of a %s relocation is "
- "in the wrong output section (%s)"),
+ "in the wrong output section (%s)\n"),
input_bfd,
sym_name,
howto->name,
if (! (CONST_STRNEQ (name, ".sdata2")
|| CONST_STRNEQ (name, ".sbss2")))
{
- (*_bfd_error_handler)
+ info->callbacks->einfo
(_("%B: the target (%s) of a %s relocation is "
- "in the wrong output section (%s)"),
+ "in the wrong output section (%s)\n"),
input_bfd,
sym_name,
howto->name,
}
else
{
- (*_bfd_error_handler)
+ info->callbacks->einfo
(_("%B: the target (%s) of a %s relocation is "
- "in the wrong output section (%s)"),
+ "in the wrong output section (%s)\n"),
input_bfd,
sym_name,
howto->name,
case R_PPC_EMB_RELST_HI:
case R_PPC_EMB_RELST_HA:
case R_PPC_EMB_BIT_FLD:
- (*_bfd_error_handler)
- (_("%B: relocation %s is not yet supported for symbol %s."),
+ info->callbacks->einfo
+ (_("%B: relocation %s is not yet supported for symbol %s\n"),
input_bfd,
howto->name,
sym_name);
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& h->def_dynamic))
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ info->callbacks->einfo
+ (_("%H: unresolvable %s relocation against symbol `%s'\n"),
+ input_bfd, input_section, rel->r_offset,
howto->name,
sym_name);
ret = FALSE;
}
else
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
- input_bfd, input_section,
- (long) rel->r_offset, howto->name, sym_name, (int) r);
+ info->callbacks->einfo
+ (_("%H: %s reloc against `%s': error %d\n"),
+ input_bfd, input_section, rel->r_offset,
+ howto->name, sym_name, (int) r);
ret = FALSE;
}
}
}
else
{
- (*_bfd_error_handler) (_("%s not defined in linker created %s"),
- htab->elf.hgot->root.root.string,
- (htab->sgotplt != NULL
- ? htab->sgotplt->name : htab->got->name));
+ info->callbacks->einfo (_("%s not defined in linker created %s\n"),
+ htab->elf.hgot->root.root.string,
+ (htab->sgotplt != NULL
+ ? htab->sgotplt->name : htab->got->name));
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
}
static struct ppc_stub_hash_entry *
ppc_add_stub (const char *stub_name,
asection *section,
- struct ppc_link_hash_table *htab)
+ struct bfd_link_info *info)
{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
asection *link_sec;
asection *stub_sec;
struct ppc_stub_hash_entry *stub_entry;
TRUE, FALSE);
if (stub_entry == NULL)
{
- (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
- section->owner, stub_name);
+ info->callbacks->einfo (_("%B: cannot create stub entry %s\n"),
+ section->owner, stub_name);
return NULL;
}
function pointers, vtable refs and suchlike in read-only
sections. Allow them to proceed, but warn that this might
break at runtime. */
- (*_bfd_error_handler)
+ info->callbacks->einfo
(_("copy reloc against `%s' requires lazy plt linking; "
- "avoid setting LD_BIND_NOW=1 or upgrade gcc"),
+ "avoid setting LD_BIND_NOW=1 or upgrade gcc\n"),
h->root.root.string);
}
if (h->size == 0)
{
- (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
- h->root.root.string);
+ info->callbacks->einfo (_("dynamic variable `%s' is zero size\n"),
+ h->root.root.string);
return TRUE;
}
pp = &p->next;
}
- (*_bfd_error_handler) (_("dynreloc miscount for %B, section %A"),
- sec->owner, sec);
+ info->callbacks->einfo (_("dynreloc miscount for %B, section %A\n"),
+ sec->owner, sec);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
&& !found_tls_get_addr_arg
&& is_branch_reloc (r_type))
{
- info->callbacks->minfo (_("%C __tls_get_addr lost arg, "
+ info->callbacks->minfo (_("%H __tls_get_addr lost arg, "
"TLS optimization disabled\n"),
ibfd, sec, rel->r_offset);
ret = TRUE;
could just mark this symbol to exclude it
from tls optimization but it's safer to skip
the entire optimization. */
- info->callbacks->minfo (_("%C arg lost __tls_get_addr, "
+ info->callbacks->minfo (_("%H arg lost __tls_get_addr, "
"TLS optimization disabled\n"),
ibfd, sec, rel->r_offset);
ret = TRUE;
}
static bfd_vma
-get_r2off (struct ppc_link_hash_table *htab,
+get_r2off (struct bfd_link_info *info,
struct ppc_stub_hash_entry *stub_entry)
{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
bfd_vma r2off = htab->stub_group[stub_entry->target_section->id].toc_off;
if (r2off == 0)
if (strcmp (opd->name, ".opd") != 0
|| opd->reloc_count != 0)
{
- (*_bfd_error_handler) (_("cannot find opd entry toc for %s"),
- stub_entry->h->elf.root.root.string);
+ info->callbacks->einfo (_("cannot find opd entry toc for %s\n"),
+ stub_entry->h->elf.root.root.string);
bfd_set_error (bfd_error_bad_value);
return 0;
}
if (!bfd_get_section_contents (opd->owner, opd, buf, opd_off + 8, 8))
return 0;
r2off = bfd_get_64 (opd->owner, buf);
- r2off -= elf_gp (stub_entry->id_sec->output_section->owner);
+ r2off -= elf_gp (info->output_bfd);
}
r2off -= htab->stub_group[stub_entry->id_sec->id].toc_off;
return r2off;
size = 4;
if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
{
- bfd_vma r2off = get_r2off (htab, stub_entry);
+ bfd_vma r2off = get_r2off (info, stub_entry);
if (r2off == 0)
{
if (off + (1 << 25) >= (bfd_vma) (1 << 26))
{
- (*_bfd_error_handler) (_("long branch stub `%s' offset overflow"),
- stub_entry->root.string);
+ info->callbacks->einfo (_("long branch stub `%s' offset overflow\n"),
+ stub_entry->root.string);
htab->stub_error = TRUE;
return FALSE;
}
FALSE, FALSE);
if (br_entry == NULL)
{
- (*_bfd_error_handler) (_("can't find branch stub `%s'"),
- stub_entry->root.string);
+ info->callbacks->einfo (_("can't find branch stub `%s'\n"),
+ stub_entry->root.string);
htab->stub_error = TRUE;
return FALSE;
}
if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
- (*_bfd_error_handler)
- (_("linkage table error against `%s'"),
+ info->callbacks->einfo
+ (_("linkage table error against `%s'\n"),
stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
htab->stub_error = TRUE;
}
else
{
- bfd_vma r2off = get_r2off (htab, stub_entry);
+ bfd_vma r2off = get_r2off (info, stub_entry);
if (r2off == 0)
{
if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
- (*_bfd_error_handler)
- (_("linkage table error against `%s'"),
+ info->callbacks->einfo
+ (_("linkage table error against `%s'\n"),
stub_entry->h != NULL
? stub_entry->h->elf.root.root.string
: "<local sym>");
size = 4;
if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
{
- r2off = get_r2off (htab, stub_entry);
+ r2off = get_r2off (info, stub_entry);
if (r2off == 0)
{
htab->stub_error = TRUE;
TRUE, FALSE);
if (br_entry == NULL)
{
- (*_bfd_error_handler) (_("can't build branch stub `%s'"),
- stub_entry->root.string);
+ info->callbacks->einfo (_("can't build branch stub `%s'\n"),
+ stub_entry->root.string);
htab->stub_error = TRUE;
return FALSE;
}
continue;
}
- stub_entry = ppc_add_stub (stub_name, section, htab);
+ stub_entry = ppc_add_stub (stub_name, section, info);
if (stub_entry == NULL)
{
free (stub_name);
|| htab->glink->rawsize != htab->glink->size)
{
htab->stub_error = TRUE;
- (*_bfd_error_handler) (_("stubs don't match calculated size"));
+ info->callbacks->einfo (_("stubs don't match calculated size\n"));
}
if (htab->stub_error)
/* R_PPC64_TLS is OK against a symbol in the TOC. */
;
else
- (*_bfd_error_handler)
+ info->callbacks->einfo
(!IS_PPC64_TLS_RELOC (r_type)
- ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
- : _("%B(%A+0x%lx): %s used with non-TLS symbol %s"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ ? _("%H: %s used with TLS symbol %s\n")
+ : _("%H: %s used with non-TLS symbol %s\n"),
+ input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
}
".init") == 0
|| strcmp (input_section->output_section->name,
".fini") == 0)
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): automatic multiple TOCs "
+ info->callbacks->einfo
+ (_("%H: automatic multiple TOCs "
"not supported using your crt files; "
- "recompile with -mminimal-toc or upgrade gcc"),
- input_bfd,
- input_section,
- (long) rel->r_offset);
+ "recompile with -mminimal-toc or upgrade gcc\n"),
+ input_bfd, input_section, rel->r_offset);
else
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): sibling call optimization to `%s' "
+ info->callbacks->einfo
+ (_("%H: sibling call optimization to `%s' "
"does not allow automatic multiple TOCs; "
"recompile with -mminimal-toc or "
"-fno-optimize-sibling-calls, "
- "or make `%s' extern"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ "or make `%s' extern\n"),
+ input_bfd, input_section, rel->r_offset,
sym_name,
sym_name);
bfd_set_error (bfd_error_bad_value);
switch (r_type)
{
default:
- (*_bfd_error_handler)
- (_("%B: unknown relocation type %d for symbol %s"),
+ info->callbacks->einfo
+ (_("%B: unknown relocation type %d for symbol %s\n"),
input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
? h->elf.type == STT_GNU_IFUNC
: ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): relocation %s for indirect "
- "function %s unsupported"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ info->callbacks->einfo
+ (_("%H: relocation %s for indirect "
+ "function %s unsupported\n"),
+ input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
ret = FALSE;
case R_PPC64_PLTREL64:
/* These ones haven't been implemented yet. */
- (*_bfd_error_handler)
- (_("%B: relocation %s is not supported for symbol %s."),
+ info->callbacks->einfo
+ (_("%B: relocation %s is not supported for symbol %s\n"),
input_bfd,
ppc64_elf_howto_table[r_type]->name, sym_name);
mask = 15;
if (((relocation + addend) & mask) != 0)
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): error: %s not a multiple of %u"),
- input_bfd, input_section, (long) rel->r_offset,
+ info->callbacks->einfo
+ (_("%H: error: %s not a multiple of %u\n"),
+ input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
mask + 1);
bfd_set_error (bfd_error_bad_value);
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& h->elf.def_dynamic))
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ info->callbacks->einfo
+ (_("%H: unresolvable %s relocation against symbol `%s'\n"),
+ input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[(int) r_type]->name,
h->elf.root.root.string);
ret = FALSE;
}
else
{
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
+ info->callbacks->einfo
+ (_("%H: %s reloc against `%s': error %d\n"),
+ input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name,
(int) r);