aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c82
1 files changed, 37 insertions, 45 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 42d9b46..5194c6c 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1,6 +1,7 @@
/* 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.
@@ -3703,12 +3704,9 @@ ppc_elf_check_relocs (bfd *abfd,
{
/* 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;
}
@@ -4704,7 +4702,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
&& !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)
@@ -4790,7 +4788,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
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)
@@ -5025,8 +5023,8 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
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;
}
@@ -7222,8 +7220,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
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);
@@ -7483,11 +7481,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
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);
}
@@ -7681,12 +7677,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
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;
@@ -7911,9 +7905,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
|| (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,
@@ -7941,9 +7935,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
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,
@@ -7988,9 +7982,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
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,
@@ -8060,8 +8054,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
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);
@@ -8119,11 +8113,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
&& !((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;
@@ -8168,10 +8160,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
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;
}
}
@@ -8660,10 +8652,10 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
}
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;
}