summaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2001-09-20 23:30:37 +0000
committerAlan Modra <amodra@bigpond.net.au>2001-09-20 23:30:37 +0000
commit58276960944b27cce10b06fd7ff8d7a8ce09edcb (patch)
tree62cc3a9fcf8959accf17b488adea42f8725cc2e1 /bfd/elf32-arm.h
parent9371d4498c3caa7d9c1ced003cc4e0944a6c0e31 (diff)
downloadgdb-58276960944b27cce10b06fd7ff8d7a8ce09edcb.tar.gz
* bfd.c (bfd_archive_filename): New function.
* bfd-in2.h: Regenerate. * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename in error messages where the bfd is an input bfd. * aout-cris.c: Likewise. * coff-arm.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * ecofflink.c: Likewise. * elf-hppa.h: Likewise. * elf.c: Likewise. * elf32-arm.h: Likewise. * elf32-cris.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mips.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-sparc.c: Likewise. * elf32-v850.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.h: Likewise. * elfxx-ia64.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peicode.h: Likewise. * srec.c: Likewise. * xcofflink.c: Likewise. * elf32-arm.h: Make _bfd_error_handler calls K&R compatible. * elflink.c (_bfd_elf_create_linker_section): Better grammar for error message. * coff-mcore.c (coff_mcore_relocate_section): Internalionalise error message. * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types. Consolidate error messages, and split long messages to two lines.
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r--bfd/elf32-arm.h107
1 files changed, 56 insertions, 51 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 5eca779ff88..a4e0e906d25 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -282,8 +282,8 @@ find_thumb_glue (link_info, name, input_bfd)
if (hash == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
- bfd_get_filename (input_bfd), tmp_name, name);
+ (*_bfd_error_handler) (_("%s: unable to find THUMB glue '%s' for `%s'"),
+ bfd_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -317,8 +317,8 @@ find_arm_glue (link_info, name, input_bfd)
if (myh == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
- bfd_get_filename (input_bfd), tmp_name, name);
+ (*_bfd_error_handler) (_("%s: unable to find ARM glue '%s' for `%s'"),
+ bfd_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -882,12 +882,12 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
&& sym_sec->owner != NULL
&& !INTERWORK_FLAG (sym_sec->owner))
{
- _bfd_error_handler
+ (*_bfd_error_handler)
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (sym_sec->owner), name);
- _bfd_error_handler
+ bfd_archive_filename (sym_sec->owner), name);
+ (*_bfd_error_handler)
(_(" first occurrence: %s: thumb call to arm"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
return false;
}
@@ -986,12 +986,12 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
&& sym_sec->owner != NULL
&& !INTERWORK_FLAG (sym_sec->owner))
{
- _bfd_error_handler
+ (*_bfd_error_handler)
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (sym_sec->owner), name);
- _bfd_error_handler
+ bfd_archive_filename (sym_sec->owner), name);
+ (*_bfd_error_handler)
(_(" first occurrence: %s: arm call to thumb"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
}
--my_offset;
@@ -1231,10 +1231,10 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* FIXME: Should we translate the instruction into a BL
instruction instead ? */
if (sym_flags != STT_ARM_TFUNC)
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
%s: Warning: Arm BLX instruction targets Arm function '%s'."),
- bfd_get_filename (input_bfd),
- h ? h->root.root.string : "(local)");
+ bfd_archive_filename (input_bfd),
+ h ? h->root.root.string : "(local)");
}
else
#endif
@@ -1427,10 +1427,10 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* FIXME: Should we translate the instruction into a BL
instruction instead ? */
if (sym_flags == STT_ARM_TFUNC)
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
%s: Warning: Thumb BLX instruction targets thumb function '%s'."),
- bfd_get_filename (input_bfd),
- h ? h->root.root.string : "(local)");
+ bfd_archive_filename (input_bfd),
+ h ? h->root.root.string : "(local)");
}
else
#endif
@@ -1924,7 +1924,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd), h->root.root.string,
+ bfd_archive_filename (input_bfd), h->root.root.string,
bfd_get_section_name (input_bfd, input_section));
relocation_needed = 0;
}
@@ -2037,13 +2037,13 @@ elf32_arm_set_private_flags (abfd, flags)
if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN)
{
if (flags & EF_ARM_INTERWORK)
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
else
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
Warning: Clearing the interwork flag of %s due to outside request"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
}
}
else
@@ -2089,9 +2089,12 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
{
if (out_flags & EF_ARM_INTERWORK)
- _bfd_error_handler (_("\
+ {
+ (*_bfd_error_handler) (_("\
Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it"),
- bfd_get_filename (obfd), bfd_get_filename (ibfd));
+ bfd_get_filename (obfd),
+ bfd_archive_filename (ibfd));
+ }
in_flags &= ~EF_ARM_INTERWORK;
}
@@ -2183,12 +2186,12 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
/* Complain about various flag mismatches. */
if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags))
{
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"),
- bfd_get_filename (ibfd),
- (in_flags & EF_ARM_EABIMASK) >> 24,
- bfd_get_filename (obfd),
- (out_flags & EF_ARM_EABIMASK) >> 24);
+ bfd_archive_filename (ibfd),
+ (in_flags & EF_ARM_EABIMASK) >> 24,
+ bfd_get_filename (obfd),
+ (out_flags & EF_ARM_EABIMASK) >> 24);
return false;
}
@@ -2197,49 +2200,51 @@ Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"),
{
if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
{
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
- bfd_get_filename (ibfd),
- in_flags & EF_ARM_APCS_26 ? 26 : 32,
- bfd_get_filename (obfd),
- out_flags & EF_ARM_APCS_26 ? 26 : 32);
+ bfd_archive_filename (ibfd),
+ in_flags & EF_ARM_APCS_26 ? 26 : 32,
+ bfd_get_filename (obfd),
+ out_flags & EF_ARM_APCS_26 ? 26 : 32);
flags_compatible = false;
}
if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
{
- _bfd_error_handler (_("\
+ char *s1 = in_flags & EF_ARM_APCS_FLOAT ? _("float") : _("integer");
+ char *s2 = out_flags & EF_ARM_APCS_26 ? _("float") : _("integer");
+ (*_bfd_error_handler) (_("\
Error: %s passes floats in %s registers, whereas %s passes them in %s registers"),
- bfd_get_filename (ibfd),
- in_flags & EF_ARM_APCS_FLOAT ? _("float") : _("integer"),
- bfd_get_filename (obfd),
- out_flags & EF_ARM_APCS_26 ? _("float") : _("integer"));
+ bfd_archive_filename (ibfd), s1,
+ bfd_get_filename (obfd), s2);
flags_compatible = false;
}
#ifdef EF_ARM_SOFT_FLOAT
if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT))
{
- _bfd_error_handler (_ ("\
+ char *s1 = in_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard");
+ char *s2 = out_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard");
+ (*_bfd_error_handler) (_ ("\
Error: %s uses %s floating point, whereas %s uses %s floating point"),
- bfd_get_filename (ibfd),
- in_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard"),
- bfd_get_filename (obfd),
- out_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard"));
+ bfd_archive_filename (ibfd), s1,
+ bfd_get_filename (obfd), s2);
flags_compatible = false;
}
#endif
/* Interworking mismatch is only a warning. */
if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
- _bfd_error_handler (_("\
+ {
+ char *s1 = (in_flags & EF_ARM_INTERWORK
+ ? _("supports") : _("does not support"));
+ char *s2 = out_flags & EF_ARM_INTERWORK ? _("does") : _("does not");
+ (*_bfd_error_handler) (_("\
Warning: %s %s interworking, whereas %s %s"),
- bfd_get_filename (ibfd),
- in_flags & EF_ARM_INTERWORK ? _("supports") : _("does not support"),
- bfd_get_filename (obfd),
- out_flags & EF_ARM_INTERWORK ? _("does") : _("does not"));
+ bfd_archive_filename (ibfd), s1,
+ bfd_get_filename (obfd), s2);
+ }
}
-
return flags_compatible;
}