summaryrefslogtreecommitdiffstats
path: root/bfd/elf32-frv.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-05-23 06:14:21 +0000
committerAlan Modra <amodra@gmail.com>2011-05-23 06:14:21 +0000
commit25f53a85d7918e2a9958450d3475f708c20352ee (patch)
tree3340019bd2279e2a7068addfe78287583ca096f9 /bfd/elf32-frv.c
parent270396f296499f4bff9a3a9d97a179743bcdae73 (diff)
downloadppe42-binutils-25f53a85d7918e2a9958450d3475f708c20352ee.tar.gz
ppe42-binutils-25f53a85d7918e2a9958450d3475f708c20352ee.zip
* 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.
Diffstat (limited to 'bfd/elf32-frv.c')
-rw-r--r--bfd/elf32-frv.c185
1 files changed, 88 insertions, 97 deletions
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 8cd26f14b5..7f3c4dd23e 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -1,5 +1,5 @@
/* 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.
@@ -2884,8 +2884,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
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;
}
@@ -2897,9 +2898,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
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;
@@ -2972,10 +2974,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3014,10 +3015,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3085,10 +3086,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3122,11 +3123,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3170,10 +3170,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3254,11 +3254,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3309,10 +3308,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3339,10 +3338,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3368,11 +3367,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3399,10 +3397,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3444,10 +3442,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3471,11 +3469,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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;
}
@@ -3593,9 +3590,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
{
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;
@@ -3633,10 +3631,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
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;
}
@@ -3664,10 +3662,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
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;
}
@@ -3713,9 +3711,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
{
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;
@@ -3754,10 +3753,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
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)
@@ -3798,10 +3796,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
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;
}
@@ -3969,16 +3967,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
&& !(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;
@@ -4126,9 +4117,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
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;
}
@@ -5882,8 +5873,8 @@ elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd,
!= (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;
}
@@ -6402,8 +6393,8 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
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;
}
OpenPOWER on IntegriCloud