summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog63
-rw-r--r--bfd/aout-adobe.c2
-rw-r--r--bfd/aout-cris.c4
-rw-r--r--bfd/bfd-in2.h3
-rw-r--r--bfd/bfd.c48
-rw-r--r--bfd/coff-arm.c30
-rw-r--r--bfd/coff-mcore.c14
-rw-r--r--bfd/coff-ppc.c10
-rw-r--r--bfd/coff-rs6000.c6
-rw-r--r--bfd/coff-sh.c22
-rw-r--r--bfd/coff-tic54x.c2
-rw-r--r--bfd/coff-tic80.c2
-rw-r--r--bfd/coff64-rs6000.c6
-rw-r--r--bfd/coffcode.h14
-rw-r--r--bfd/coffgen.c2
-rw-r--r--bfd/cofflink.c8
-rw-r--r--bfd/ecofflink.c2
-rw-r--r--bfd/elf-hppa.h4
-rw-r--r--bfd/elf.c10
-rw-r--r--bfd/elf32-arm.h107
-rw-r--r--bfd/elf32-cris.c51
-rw-r--r--bfd/elf32-gen.c12
-rw-r--r--bfd/elf32-hppa.c24
-rw-r--r--bfd/elf32-i370.c34
-rw-r--r--bfd/elf32-i386.c42
-rw-r--r--bfd/elf32-m32r.c18
-rw-r--r--bfd/elf32-mcore.c8
-rw-r--r--bfd/elf32-mips.c28
-rw-r--r--bfd/elf32-ppc.c30
-rw-r--r--bfd/elf32-s390.c2
-rw-r--r--bfd/elf32-sh.c24
-rw-r--r--bfd/elf32-sparc.c6
-rw-r--r--bfd/elf32-v850.c4
-rw-r--r--bfd/elf64-alpha.c12
-rw-r--r--bfd/elf64-gen.c12
-rw-r--r--bfd/elf64-ppc.c20
-rw-r--r--bfd/elf64-s390.c2
-rw-r--r--bfd/elf64-sparc.c46
-rw-r--r--bfd/elf64-x86-64.c2
-rw-r--r--bfd/elflink.c4
-rw-r--r--bfd/elflink.h14
-rw-r--r--bfd/elfxx-ia64.c20
-rw-r--r--bfd/ieee.c6
-rw-r--r--bfd/ihex.c18
-rw-r--r--bfd/libbfd.c2
-rw-r--r--bfd/pdp11.c4
-rw-r--r--bfd/pe-mips.c8
-rw-r--r--bfd/peicode.h14
-rw-r--r--bfd/srec.c2
-rw-r--r--bfd/xcofflink.c22
50 files changed, 463 insertions, 387 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2a39f18af08..61f304ea467 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,66 @@
+2001-09-21 Alan Modra <amodra@bigpond.net.au>
+
+ * 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.
+
2001-09-20 John Reiser <jreiser@BitWagon.com>
* elf32-i386.c (elf_i386_relocate_section): coordinate info->symbolic
diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c
index 5a168b01ca3..72fed359b23 100644
--- a/bfd/aout-adobe.c
+++ b/bfd/aout-adobe.c
@@ -194,7 +194,7 @@ aout_adobe_callback (abfd)
default:
(*_bfd_error_handler)
(_("%s: Unknown section type in a.out.adobe file: %x\n"),
- bfd_get_filename (abfd), ext->e_type[0]);
+ bfd_archive_filename (abfd), ext->e_type[0]);
goto no_more_sections;
}
diff --git a/bfd/aout-cris.c b/bfd/aout-cris.c
index ab92df5c9bc..1a861230a0e 100644
--- a/bfd/aout-cris.c
+++ b/bfd/aout-cris.c
@@ -249,7 +249,7 @@ MY(swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
if (r_type > 2)
{
(*_bfd_error_handler) (_("%s: Invalid relocation type imported: %d"),
- bfd_get_filename (abfd), r_type);
+ bfd_archive_filename (abfd), r_type);
bfd_set_error(bfd_error_wrong_format);
}
@@ -260,7 +260,7 @@ MY(swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
{
(*_bfd_error_handler)
(_("%s: Bad relocation record imported: %d"),
- bfd_get_filename (abfd), r_index);
+ bfd_archive_filename (abfd), r_index);
bfd_set_error (bfd_error_wrong_format);
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 4df6f1d822e..0b5584de092 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3262,6 +3262,9 @@ bfd_set_error_program_name PARAMS ((const char *));
bfd_error_handler_type
bfd_get_error_handler PARAMS ((void));
+const char *
+bfd_archive_filename PARAMS ((bfd *));
+
long
bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 8101814106f..8ffc7c342a5 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -529,6 +529,54 @@ bfd_get_error_handler ()
{
return _bfd_error_handler;
}
+
+/*
+FUNCTION
+ bfd_archive_filename
+
+SYNOPSIS
+ const char *bfd_archive_filename (bfd *);
+
+DESCRIPTION
+ For a BFD that is a component of an archive, returns a string
+ with both the archive name and file name. For other BFDs, just
+ returns the file name.
+*/
+
+const char *
+bfd_archive_filename (abfd)
+ bfd *abfd;
+{
+ if (abfd->my_archive)
+ {
+ static size_t curr = 0;
+ static char *buf;
+ size_t needed;
+
+ needed = (strlen (bfd_get_filename (abfd->my_archive))
+ + strlen (bfd_get_filename (abfd)) + 3);
+ if (needed > curr)
+ {
+ if (curr)
+ free (buf);
+ curr = needed + (needed >> 1);
+ buf = bfd_malloc (curr);
+ /* If we can't malloc, fail safe by returning just the file
+ name. This function is only used when building error
+ messages. */
+ if (!buf)
+ {
+ curr = 0;
+ return bfd_get_filename (abfd);
+ }
+ }
+ sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd));
+ return buf;
+ }
+ else
+ return bfd_get_filename (abfd);
+}
/*
SECTION
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 8dcb3bbf916..df2be769540 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1049,7 +1049,7 @@ find_thumb_glue (info, name, input_bfd)
if (myh == 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_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -1078,7 +1078,7 @@ find_arm_glue (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_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -1373,11 +1373,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_error_handler
/* xgettext:c-format */
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (h_sec->owner), name);
+ bfd_archive_filename (h_sec->owner), name);
_bfd_error_handler
/* xgettext:c-format */
(_(" first occurrence: %s: arm call to thumb"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
}
--my_offset;
@@ -1468,11 +1468,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_error_handler
/* xgettext:c-format */
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (h_sec->owner), name);
+ bfd_archive_filename (h_sec->owner), name);
_bfd_error_handler
/* xgettext:c-format */
(_(" first occurrence: %s: thumb call to arm"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
_bfd_error_handler
(_(" consider relinking with --support-old-code enabled"));
}
@@ -1765,7 +1765,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
case bfd_reloc_outofrange:
(*_bfd_error_handler)
(_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
return false;
@@ -2105,7 +2105,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
if (symndx >= obj_conv_table_size (abfd))
{
_bfd_error_handler (_("%s: illegal symbol index in reloc: %d"),
- bfd_get_filename (abfd), symndx);
+ bfd_archive_filename (abfd), symndx);
continue;
}
@@ -2233,7 +2233,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
_bfd_error_handler
/* xgettext: c-format */
(_("%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"),
- bfd_get_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
+ bfd_archive_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
);
@@ -2252,7 +2252,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
/* xgettext: c-format */
msg = _("%s: ERROR: passes floats in integer registers whereas target %s uses float registers");
- _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ _bfd_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
@@ -2269,7 +2269,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
else
/* xgettext: c-format */
msg = _("%s: ERROR: compiled as absolute position code, whereas target %s is position independent");
- _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ _bfd_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
@@ -2302,7 +2302,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
/* xgettext: c-format */
msg = _("Warning: input file %s does not support interworking, whereas %s does.");
- _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ _bfd_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
}
}
@@ -2399,11 +2399,11 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
if (flag)
/* xgettext: c-format */
_bfd_error_handler (_("Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
else
/* xgettext: c-format */
_bfd_error_handler (_("Warning: Clearing the interworking flag of %s due to outside request"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
flag = 0;
}
@@ -2463,7 +2463,7 @@ coff_arm_copy_private_bfd_data (src, dest)
/* xgettext:c-format */
_bfd_error_handler (("Warning: Clearing the interworking bit of %s, because the non-interworking code in %s has been copied into it"),
bfd_get_filename (dest),
- bfd_get_filename (src));
+ bfd_archive_filename (src));
}
SET_INTERWORK_FLAG (dest, 0);
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index 8ddd06acf5a..323bc455163 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -282,7 +282,7 @@ mcore_coff_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
_bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
reloc_entry->howto->name,
reloc_entry->howto->type);
@@ -396,10 +396,10 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
&& output_bfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
(*_bfd_error_handler)
- (_("%s: compiled for a %s endian system and target is %s endian.\n"),
- bfd_get_filename (input_bfd),
- bfd_big_endian (input_bfd) ? "big" : "little",
- bfd_big_endian (output_bfd) ? "big" : "little");
+ (_("%s: compiled for a %s system and target is %s.\n"),
+ bfd_archive_filename (input_bfd),
+ bfd_big_endian (input_bfd) ? _("big endian") : _("little endian"),
+ bfd_big_endian (output_bfd) ? _("big endian") : _("little endian"));
bfd_set_error (bfd_error_wrong_format);
return false;
@@ -504,7 +504,7 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
{
default:
_bfd_error_handler (_("%s: unsupported relocation type 0x%02x"),
- bfd_get_filename (input_bfd), r_type);
+ bfd_archive_filename (input_bfd), r_type);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -512,7 +512,7 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
fprintf (stderr,
_("Warning: unsupported reloc %s <file %s, section %s>\n"),
howto->name,
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
input_section->name);
fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index e77add6d30c..7dd4aadd258 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1195,7 +1195,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
default:
(*_bfd_error_handler)
(_("%s: unsupported relocation type 0x%02x"),
- bfd_get_filename (input_bfd), r_type);
+ bfd_archive_filename (input_bfd), r_type);
bfd_set_error (bfd_error_bad_value);
return false;
case IMAGE_REL_PPC_TOCREL16:
@@ -1288,7 +1288,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: Relocation for %s of %lx exceeds Toc size limit"),
- bfd_get_filename (input_bfd), name,
+ bfd_archive_filename (input_bfd), name,
(unsigned long) our_toc_offset);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1345,7 +1345,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: Relocation exceeds allocated TOC (%lx)"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(unsigned long) toc_section->_raw_size);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1402,7 +1402,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
fprintf (stderr,
_("Warning: unsupported reloc %s <file %s, section %s>\n"),
howto->name,
- bfd_get_filename(input_bfd),
+ bfd_archive_filename(input_bfd),
input_section->name);
fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
@@ -1421,7 +1421,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
(*_bfd_error_handler)
(_("%s: Out of order IMGLUE reloc for %s"),
- bfd_get_filename (input_bfd), my_name);
+ bfd_archive_filename (input_bfd), my_name);
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 44ede2534a4..d97cb030ae9 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -2576,7 +2576,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
default:
(*_bfd_error_handler)
(_("%s: unsupported relocation type 0x%02x"),
- bfd_get_filename (input_bfd), (unsigned int) rel->r_type);
+ bfd_archive_filename (input_bfd), (unsigned int) rel->r_type);
bfd_set_error (bfd_error_bad_value);
return false;
case R_POS:
@@ -2622,7 +2622,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
{
(*_bfd_error_handler)
(_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
- bfd_get_filename (input_bfd), rel->r_vaddr,
+ bfd_archive_filename (input_bfd), rel->r_vaddr,
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -2872,7 +2872,7 @@ xcoff_create_csect_from_smclas (abfd, aux, symbol_name)
{
(*_bfd_error_handler)
(_("%s: symbol `%s' has unrecognized smclas %d"),
- bfd_get_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+ bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
bfd_set_error (bfd_error_bad_value);
}
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index eb1120b566a..6213f6d3111 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -761,7 +761,7 @@ sh_relax_section (abfd, sec, link_info, again)
if (laddr >= sec->_raw_size)
{
(*_bfd_error_handler) ("%s: 0x%lx: warning: bad R_SH_USES offset",
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
(unsigned long) irel->r_vaddr);
continue;
}
@@ -772,7 +772,7 @@ sh_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
("%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x",
- bfd_get_filename (abfd), (unsigned long) irel->r_vaddr, insn));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr, insn));
continue;
}
@@ -789,7 +789,7 @@ sh_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
("%s: 0x%lx: warning: bad R_SH_USES load offset",
- bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
continue;
}
@@ -812,7 +812,7 @@ sh_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
("%s: 0x%lx: warning: could not find expected reloc",
- bfd_get_filename (abfd), (unsigned long) paddr));
+ bfd_archive_filename (abfd), (unsigned long) paddr));
continue;
}
@@ -828,7 +828,7 @@ sh_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
("%s: 0x%lx: warning: symbol in unexpected section",
- bfd_get_filename (abfd), (unsigned long) paddr));
+ bfd_archive_filename (abfd), (unsigned long) paddr));
continue;
}
@@ -963,7 +963,7 @@ sh_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
("%s: 0x%lx: warning: could not find expected COUNT reloc",
- bfd_get_filename (abfd), (unsigned long) paddr));
+ bfd_archive_filename (abfd), (unsigned long) paddr));
continue;
}
@@ -972,7 +972,7 @@ sh_relax_section (abfd, sec, link_info, again)
if (irelcount->r_offset == 0)
{
((*_bfd_error_handler) ("%s: 0x%lx: warning: bad count",
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
(unsigned long) paddr));
continue;
}
@@ -1368,7 +1368,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
{
((*_bfd_error_handler)
("%s: 0x%lx: fatal: reloc overflow while relaxing",
- bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -1468,7 +1468,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
{
((*_bfd_error_handler)
("%s: fatal: generic symbols retrieved before relaxing",
- bfd_get_filename (abfd)));
+ bfd_archive_filename (abfd)));
bfd_set_error (bfd_error_invalid_operation);
return false;
}
@@ -2827,7 +2827,7 @@ sh_swap_insns (abfd, sec, relocs, contents, addr)
{
((*_bfd_error_handler)
("%s: 0x%lx: fatal: reloc overflow while relaxing",
- bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -2891,7 +2891,7 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
{
(*_bfd_error_handler)
("%s: illegal symbol index %ld in relocs",
- bfd_get_filename (input_bfd), symndx);
+ bfd_archive_filename (input_bfd), symndx);
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index e44e93472f2..5f36f0a446d 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -388,7 +388,7 @@ tic54x_reloc_processing (relent, reloc, symbols, abfd, section)
{
(*_bfd_error_handler)
(_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_get_filename (abfd), reloc->r_symndx);
+ bfd_archive_filename (abfd), reloc->r_symndx);
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index 373acab894d..de69ecbab6a 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -684,7 +684,7 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
case bfd_reloc_outofrange:
(*_bfd_error_handler)
(_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
return false;
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index e5485a761be..4d697deffb6 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1159,7 +1159,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
default:
(*_bfd_error_handler)
(_("%s: unsupported relocation type 0x%02x"),
- bfd_get_filename (input_bfd), (unsigned int) rel->r_type);
+ bfd_archive_filename (input_bfd), (unsigned int) rel->r_type);
bfd_set_error (bfd_error_bad_value);
return false;
case R_POS:
@@ -1205,7 +1205,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
{
(*_bfd_error_handler)
(_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
- bfd_get_filename (input_bfd), rel->r_vaddr,
+ bfd_archive_filename (input_bfd), rel->r_vaddr,
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -2055,7 +2055,7 @@ xcoff64_create_csect_from_smclas (abfd, aux, symbol_name)
{
(*_bfd_error_handler)
(_("%s: symbol `%s' has unrecognized smclas %d"),
- bfd_get_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+ bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
bfd_set_error (bfd_error_bad_value);
}
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index fc47d578784..dff083963ad 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1071,7 +1071,7 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
{
(*_bfd_error_handler)
(_("%s (%s): Section flag %s (0x%x) ignored"),
- bfd_get_filename (abfd), name, unhandled, flag);
+ bfd_archive_filename (abfd), name, unhandled, flag);
result = false;
}
}
@@ -4194,7 +4194,7 @@ coff_slurp_line_table (abfd, asect)
{
(*_bfd_error_handler)
(_("%s: warning: illegal symbol index %ld in line numbers"),
- bfd_get_filename (abfd), dst.l_addr.l_symndx);
+ bfd_archive_filename (abfd), dst.l_addr.l_symndx);
symndx = 0;
warned = true;
}
@@ -4208,7 +4208,7 @@ coff_slurp_line_table (abfd, asect)
{
(*_bfd_error_handler)
(_("%s: warning: duplicate line number information for `%s'"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
bfd_asymbol_name (&sym->symbol));
}
sym->lineno = cache_ptr;
@@ -4567,7 +4567,7 @@ coff_slurp_symbol_table (abfd)
default:
(*_bfd_error_handler)
(_("%s: Unrecognized storage class %d for %s symbol `%s'"),
- bfd_get_filename (abfd), src->u.syment.n_sclass,
+ bfd_archive_filename (abfd), src->u.syment.n_sclass,
dst->symbol.section->name, dst->symbol.name);
dst->symbol.flags = BSF_DEBUGGING;
dst->symbol.value = (src->u.syment.n_value);
@@ -4698,7 +4698,7 @@ coff_classify_symbol (abfd, syment)
(*_bfd_error_handler)
(_("warning: %s: local symbol `%s' has no section"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
_bfd_coff_internal_syment_name (abfd, syment, buf));
}
@@ -4805,7 +4805,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
{
(*_bfd_error_handler)
(_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_get_filename (abfd), dst.r_symndx);
+ bfd_archive_filename (abfd), dst.r_symndx);
cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
@@ -4843,7 +4843,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
{
(*_bfd_error_handler)
(_("%s: illegal relocation type %d at address 0x%lx"),
- bfd_get_filename (abfd), dst.r_type, (long) dst.r_vaddr);
+ bfd_archive_filename (abfd), dst.r_type, (long) dst.r_vaddr);
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 08c39f67703..4a06c68a003 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1645,7 +1645,7 @@ _bfd_coff_read_string_table (abfd)
if (strsize < STRING_SIZE_SIZE)
{
(*_bfd_error_handler)
- (_("%s: bad string table size %lu"), bfd_get_filename (abfd),
+ (_("%s: bad string table size %lu"), bfd_archive_filename (abfd),
(unsigned long) strsize);
bfd_set_error (bfd_error_bad_value);
return NULL;
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index e99c470cf48..31ac75612cf 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -535,7 +535,7 @@ coff_link_add_symbols (abfd, info)
(*_bfd_error_handler)
(_("Warning: type of symbol `%s' changed from %d to %d in %s"),
name, (*sym_hash)->type, sym.n_type,
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
/* We don't want to change from a meaningful
base type to a null one, but if we know
@@ -2317,7 +2317,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
{
((*_bfd_error_handler)
(_("%s: relocs in section `%s', but it has no contents"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_get_section_name (input_bfd, o)));
bfd_set_error (bfd_error_no_contents);
return false;
@@ -2895,7 +2895,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
{
(*_bfd_error_handler)
("%s: illegal symbol index %ld in relocs",
- bfd_get_filename (input_bfd), symndx);
+ bfd_archive_filename (input_bfd), symndx);
return false;
}
else
@@ -3017,7 +3017,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
case bfd_reloc_outofrange:
(*_bfd_error_handler)
(_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
return false;
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c
index 633a9e6b854..53d65441dbe 100644
--- a/bfd/ecofflink.c
+++ b/bfd/ecofflink.c
@@ -1201,7 +1201,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
fdr.issBase = output_symhdr->issMax;
fdr.cbSs = 0;
fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
if (fdr.rss == -1)
return false;
fdr.isymBase = output_symhdr->isymMax;
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 2b1d38eace1..e584bb94765 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1367,7 +1367,7 @@ elf_hppa_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 = 0;
}
@@ -1400,7 +1400,7 @@ elf_hppa_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 = 0;
}
diff --git a/bfd/elf.c b/bfd/elf.c
index 89828f4fc08..f5eb576c9a9 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -334,7 +334,7 @@ bfd_elf_string_from_elf_section (abfd, shindex, strindex)
{
(*_bfd_error_handler)
(_("%s: invalid string offset %u >= %lu for section `%s'"),
- bfd_get_filename (abfd), strindex, (unsigned long) hdr->sh_size,
+ bfd_archive_filename (abfd), strindex, (unsigned long) hdr->sh_size,
((shindex == elf_elfheader(abfd)->e_shstrndx
&& strindex == hdr->sh_name)
? ".shstrtab"
@@ -1398,7 +1398,7 @@ bfd_section_from_shdr (abfd, shindex)
{
((*_bfd_error_handler)
(_("%s: invalid link %lu for reloc section %s (index %u)"),
- bfd_get_filename (abfd), hdr->sh_link, name, shindex));
+ bfd_archive_filename (abfd), hdr->sh_link, name, shindex));
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
}
@@ -3595,7 +3595,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
which is used in a relocation entry. */
(*_bfd_error_handler)
(_("%s: symbol `%s' required but not present"),
- bfd_get_filename (abfd), bfd_asymbol_name (asym_ptr));
+ bfd_archive_filename (abfd), bfd_asymbol_name (asym_ptr));
bfd_set_error (bfd_error_no_symbols);
return -1;
}
@@ -3845,7 +3845,7 @@ copy_private_bfd_data (ibfd, obfd)
if (segment->p_type == PT_LOAD)
_bfd_error_handler
(_("%s: warning: Empty loadable segment detected\n"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
map->count = 0;
*pointer_to_map = map;
@@ -5227,7 +5227,7 @@ _bfd_elf_validate_reloc (abfd, areloc)
fail:
(*_bfd_error_handler)
(_("%s: unsupported relocation type %s"),
- bfd_get_filename (abfd), areloc->howto->name);
+ bfd_archive_filename (abfd), areloc->howto->name);
bfd_set_error (bfd_error_bad_value);
return false;
}
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;
}
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 0a94c12f91e..e50d05cca75 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -876,21 +876,12 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ sec->output_offset);
else
{
- if (input_bfd->my_archive)
- (*_bfd_error_handler)
- (_("%s(%s): unresolvable relocation %s against symbol `%s' from %s section"),
- bfd_get_filename (bfd_my_archive (input_bfd)),
- bfd_get_filename (input_bfd),
- cris_elf_howto_table[r_type].name,
- symname,
- bfd_get_section_name (input_bfd, input_section));
- else
- (*_bfd_error_handler)
- (_("%s: unresolvable relocation %s against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd),
- cris_elf_howto_table[r_type].name,
- symname,
- bfd_get_section_name (input_bfd, input_section));
+ (*_bfd_error_handler)
+ (_("%s: unresolvable relocation %s against symbol `%s' from %s section"),
+ bfd_archive_filename (input_bfd),
+ cris_elf_howto_table[r_type].name,
+ symname,
+ bfd_get_section_name (input_bfd, input_section));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -950,7 +941,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
cris_elf_howto_table[r_type].name,
symname[0] != '\0' ? symname : _("[whose name is lost]"),
bfd_get_section_name (input_bfd, input_section));
@@ -1069,14 +1060,14 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (h == NULL)
(*_bfd_error_handler)
(_("%s: relocation %s with non-zero addend %d against local symbol from %s section"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
cris_elf_howto_table[r_type].name,
rel->r_addend,
bfd_get_section_name (input_bfd, input_section));
else
(*_bfd_error_handler)
(_("%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
cris_elf_howto_table[r_type].name,
rel->r_addend,
symname[0] != '\0' ? symname : _("[whose name is lost]"),
@@ -1094,7 +1085,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: relocation %s is not allowed for global symbol: `%s' from %s section"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
cris_elf_howto_table[r_type].name,
symname,
bfd_get_section_name (input_bfd, input_section));
@@ -1212,7 +1203,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: Internal inconsistency; no relocation section %s"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
name);
bfd_set_error (bfd_error_bad_value);
@@ -2470,19 +2461,11 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
&& (sec->flags & SEC_READONLY) != 0)
{
/* FIXME: How do we make this optionally a warning only? */
- if (abfd->my_archive)
- (*_bfd_error_handler)
- (_("%s(%s), section %s:\n relocation %s should not be used in a shared object; recompile with -fPIC"),
- bfd_get_filename (bfd_my_archive (abfd)),
- bfd_get_filename (abfd),
- sec->name,
- cris_elf_howto_table[r_type].name);
- else
- (*_bfd_error_handler)
- (_("%s, section %s:\n relocation %s should not be used in a shared object; recompile with -fPIC"),
- bfd_get_filename (abfd),
- sec->name,
- cris_elf_howto_table[r_type].name);
+ (*_bfd_error_handler)
+ (_("%s, section %s:\n relocation %s should not be used in a shared object; recompile with -fPIC"),
+ bfd_archive_filename (abfd),
+ sec->name,
+ cris_elf_howto_table[r_type].name);
}
/* Fall through. */
@@ -2988,7 +2971,7 @@ cris_elf_merge_private_bfd_data (ibfd, obfd)
((new_flags & EF_CRIS_UNDERSCORE)
? _("%s: uses _-prefixed symbols, but writing file with non-prefixed symbols")
: _("%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/elf32-gen.c b/bfd/elf32-gen.c
index 7832d110efb..58b5fc6273c 100644
--- a/bfd/elf32-gen.c
+++ b/bfd/elf32-gen.c
@@ -79,15 +79,9 @@ elf32_generic_link_add_symbols (abfd, info)
Elf_Internal_Ehdr *ehdrp;
ehdrp = elf_elfheader (abfd);
- if (abfd->my_archive)
- (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
- else
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
+ (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+ bfd_archive_filename (abfd),
+ ehdrp->e_machine);
bfd_set_error (bfd_error_wrong_format);
return false;
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index a774782ccfd..e2a7cc3e385 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -623,7 +623,7 @@ hppa_get_stub_entry (input_section, sym_sec, hash, rel, hplink)
{
if (hash == NULL || hash->elf.root.type != bfd_link_hash_undefweak)
(*_bfd_error_handler) (_("%s(%s+0x%lx): cannot find stub entry %s"),
- bfd_get_filename (input_section->owner),
+ bfd_archive_filename (input_section->owner),
input_section->name,
(long) rel->r_offset,
stub_name);
@@ -684,7 +684,7 @@ hppa_add_stub (stub_name, section, hplink)
if (stub_entry == NULL)
{
(*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
- bfd_get_filename (section->owner),
+ bfd_archive_filename (section->owner),
stub_name);
return NULL;
}
@@ -878,7 +878,7 @@ hppa_build_one_stub (gen_entry, in_arg)
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"),
- bfd_get_filename (stub_entry->target_section->owner),
+ bfd_archive_filename (stub_entry->target_section->owner),
stub_sec->name,
(long) stub_entry->stub_offset,
stub_entry->root.string);
@@ -1036,7 +1036,7 @@ hppa_build_one_stub (gen_entry, in_arg)
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
- bfd_get_filename (stub_entry->target_section->owner),
+ bfd_archive_filename (stub_entry->target_section->owner),
stub_sec->name,
(long) stub_entry->stub_offset,
stub_entry->root.string);
@@ -1376,7 +1376,7 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
{
(*_bfd_error_handler)
(_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
elf_hppa_howto_table[r_type].name);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1396,7 +1396,7 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
{
(*_bfd_error_handler)
(_("%s: relocation %s should not be used when making a shared object; recompile with -fPIC"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
elf_hppa_howto_table[r_type].name);
}
/* Fall through. */
@@ -2826,8 +2826,8 @@ elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
else
{
(*_bfd_error_handler) (_("%s: duplicate export stub %s"),
- bfd_get_filename (input_bfd),
- stub_name);
+ bfd_archive_filename (input_bfd),
+ stub_name);
}
}
}
@@ -3408,7 +3408,7 @@ final_link_relocate (input_section, contents, rel, value, hplink, sym_sec, h)
#if 1 /* debug them. */
(*_bfd_error_handler)
(_("%s(%s+0x%lx): fixing %s"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
input_section->name,
(long) rel->r_offset,
howto->name);
@@ -3524,7 +3524,7 @@ final_link_relocate (input_section, contents, rel, value, hplink, sym_sec, h)
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
input_section->name,
(long) rel->r_offset,
stub_entry->root.string);
@@ -4062,11 +4062,13 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot handle %s for %s"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
input_section->name,
(long) rel->r_offset,
howto->name,
sym_name);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
}
else
{
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 61d4d88256b..e4fe1b6ddd8 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -428,7 +428,7 @@ i370_elf_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
- bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+ bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -536,8 +536,8 @@ i370_elf_create_linker_section (abfd, info, which)
{
default:
(*_bfd_error_handler) ("%s: Unknown special linker type %d",
- bfd_get_filename (abfd),
- (int)which);
+ bfd_archive_filename (abfd),
+ (int) which);
bfd_set_error (bfd_error_bad_value);
return (elf_linker_section_t *)0;
@@ -1025,7 +1025,7 @@ i370_elf_check_relocs (abfd, info, sec, relocs)
#ifdef DEBUG
fprintf (stderr, "i370_elf_check_relocs called for section %s in %s\n",
bfd_get_section_name (abfd, sec),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
#endif
dynobj = elf_hash_table (info)->dynobj;
@@ -1292,9 +1292,9 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef DEBUG
fprintf (stderr, "i370_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
- (long)input_section->reloc_count,
+ (long) input_section->reloc_count,
(info->relocateable) ? " (relocatable)" : "");
#endif
@@ -1322,8 +1322,8 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| !i370_elf_howto_table[(int)r_type])
{
(*_bfd_error_handler) ("%s: unknown relocation type %d",
- bfd_get_filename (input_bfd),
- (int)r_type);
+ bfd_archive_filename (input_bfd),
+ (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = false;
@@ -1420,12 +1420,13 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- switch ((int)r_type)
+ switch ((int) r_type)
{
default:
- (*_bfd_error_handler) ("%s: unknown relocation type %d for symbol %s",
- bfd_get_filename (input_bfd),
- (int)r_type, sym_name);
+ (*_bfd_error_handler)
+ ("%s: unknown relocation type %d for symbol %s",
+ bfd_archive_filename (input_bfd),
+ (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = false;
@@ -1582,10 +1583,11 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case (int)R_I370_COPY:
case (int)R_I370_RELATIVE:
- (*_bfd_error_handler) ("%s: Relocation %s is not yet supported for symbol %s.",
- bfd_get_filename (input_bfd),
- i370_elf_howto_table[ (int)r_type ]->name,
- sym_name);
+ (*_bfd_error_handler)
+ ("%s: Relocation %s is not yet supported for symbol %s.",
+ bfd_archive_filename (input_bfd),
+ i370_elf_howto_table[(int) r_type]->name,
+ sym_name);
bfd_set_error (bfd_error_invalid_operation);
ret = false;
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 82c17ce11fa..4b01066e0b3 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -289,7 +289,7 @@ elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
>= R_386_vt - R_386_ext))
{
(*_bfd_error_handler) (_("%s: invalid relocation type %d"),
- bfd_get_filename (abfd), (int) r_type);
+ bfd_archive_filename (abfd), (int) r_type);
indx = (unsigned int) R_386_NONE;
}
cache_ptr->howto = &elf_howto_table[indx];
@@ -581,15 +581,9 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- if (abfd->my_archive)
- (*_bfd_error_handler) (_("%s(%s): bad symbol index: %d"),
- bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd),
- r_symndx);
- else
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_get_filename (abfd),
- r_symndx);
+ (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
+ bfd_archive_filename (abfd),
+ r_symndx);
return false;
}
@@ -748,15 +742,9 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
|| strcmp (bfd_get_section_name (abfd, sec),
name + 4) != 0)
{
- if (abfd->my_archive)
- (*_bfd_error_handler) (_("%s(%s): bad relocation section name `%s\'"),
- bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd),
- name);
- else
- (*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"),
- bfd_get_filename (abfd),
- name);
+ (*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"),
+ bfd_archive_filename (abfd),
+ name);
}
sreloc = bfd_get_section_by_name (dynobj, name);
@@ -1744,17 +1732,9 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
input_section),
name + 4) != 0)
{
- if (input_bfd->my_archive)
- (*_bfd_error_handler)\
- (_("%s(%s): bad relocation section name `%s\'"),
- bfd_get_filename (input_bfd->my_archive),
- bfd_get_filename (input_bfd),
- name);
- else
- (*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_get_filename (input_bfd),
- name);
+ (*_bfd_error_handler)
+ (_("%s: bad relocation section name `%s\'"),
+ bfd_archive_filename (input_bfd), name);
return false;
}
@@ -1836,7 +1816,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
(_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_get_section_name (input_bfd, input_section),
(long) rel->r_offset,
h->root.root.string);
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index bd6e80a9529..830cd669b22 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1008,7 +1008,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type < 0 || r_type >= (int) R_M32R_max)
{
(*_bfd_error_handler) (_("%s: unknown relocation type %d"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = false;
@@ -1215,11 +1215,12 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- (*_bfd_error_handler) (_("%s: The target (%s) of an %s relocation is in the wrong section (%s)"),
- bfd_get_filename (input_bfd),
- sym_name,
- m32r_elf_howto_table[(int) r_type].name,
- bfd_get_section_name (abfd, sec));
+ (*_bfd_error_handler)
+ (_("%s: The target (%s) of an %s relocation is in the wrong section (%s)"),
+ bfd_archive_filename (input_bfd),
+ sym_name,
+ m32r_elf_howto_table[(int) r_type].name,
+ bfd_get_section_name (abfd, sec));
/*bfd_set_error (bfd_error_bad_value); ??? why? */
ret = false;
continue;
@@ -2016,8 +2017,9 @@ m32r_elf_merge_private_bfd_data (ibfd, obfd)
{
if ((in_flags & EF_M32R_ARCH) != E_M32R_ARCH)
{
- _bfd_error_handler (_("%s: Instruction set mismatch with previous modules"),
- bfd_get_filename (ibfd));
+ (*_bfd_error_handler)
+ (_("%s: Instruction set mismatch with previous modules"),
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
return false;
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 8cf982290df..669ba51be32 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -371,7 +371,7 @@ mcore_elf_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
_bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
reloc_entry->howto->name,
reloc_entry->howto->type);
@@ -428,7 +428,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef DEBUG
fprintf (stderr,
"mcore_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
(long) input_section->reloc_count,
(info->relocateable) ? " (relocatable)" : "");
@@ -456,7 +456,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| ! mcore_elf_howto_table [(int)r_type])
{
_bfd_error_handler (_("%s: Unknown relocation type %d\n"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type);
bfd_set_error (bfd_error_bad_value);
@@ -497,7 +497,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (howto->special_function == mcore_elf_unsupported_reloc)
{
_bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
howto->name,
(int)r_type);
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 14bce733d01..3a4feb915f1 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -2599,7 +2599,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
old_flags &= ~EF_MIPS_PIC;
(*_bfd_error_handler)
(_("%s: linking PIC files with non-PIC files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
ok = false;
}
@@ -2609,7 +2609,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
old_flags &= ~EF_MIPS_CPIC;
(*_bfd_error_handler)
(_("%s: linking abicalls files with non-abicalls files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
ok = false;
}
@@ -2638,7 +2638,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"),
- bfd_get_filename (ibfd), new_isa, old_isa);
+ bfd_archive_filename (ibfd), new_isa, old_isa);
ok = false;
}
}
@@ -2647,7 +2647,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: ISA mismatch (%d) with previous modules (%d)"),
- bfd_get_filename (ibfd),
+ bfd_archive_filename (ibfd),
elf_mips_mach (new_flags),
elf_mips_mach (old_flags));
ok = false;
@@ -2670,7 +2670,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: ABI mismatch: linking %s module with previous %s modules"),
- bfd_get_filename (ibfd),
+ bfd_archive_filename (ibfd),
elf_mips_abi_name (ibfd),
elf_mips_abi_name (obfd));
ok = false;
@@ -2684,7 +2684,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (unsigned long) new_flags,
+ bfd_archive_filename (ibfd), (unsigned long) new_flags,
(unsigned long) old_flags);
ok = false;
}
@@ -6731,7 +6731,7 @@ mips_elf_perform_relocation (info, howto, relocation, value,
{
(*_bfd_error_handler)
(_("%s: %s+0x%lx: jump to stub routine which is not jal"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
input_section->name,
(unsigned long) relocation->r_offset);
bfd_set_error (bfd_error_bad_value);
@@ -7720,15 +7720,9 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
h = NULL;
else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
{
- if (abfd->my_archive)
- (*_bfd_error_handler)
- (_("%s(%s) Malformed reloc detected for section %s"),
- bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd), name);
- else
- (*_bfd_error_handler)
- (_("%s: Malformed reloc detected for section %s"),
- bfd_get_filename (abfd), name);
+ (*_bfd_error_handler)
+ (_("%s: Malformed reloc detected for section %s"),
+ bfd_archive_filename (abfd), name);
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -7806,7 +7800,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
{
(*_bfd_error_handler)
(_("%s: CALL16 reloc at 0x%lx not against global symbol"),
- bfd_get_filename (abfd), (unsigned long) rel->r_offset);
+ bfd_archive_filename (abfd), (unsigned long) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 8e7ccd48915..a85995654e2 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1452,7 +1452,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
&& (old_flags & EF_PPC_RELOCATABLE) != 0)
@@ -1460,7 +1460,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
/* The output is -mrelocatable-lib iff both the input files are. */
@@ -1486,7 +1486,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long) new_flags, (long) old_flags);
+ bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
}
if (error)
@@ -2083,7 +2083,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
#ifdef DEBUG
fprintf (stderr, "ppc_elf_check_relocs called for section %s in %s\n",
bfd_get_section_name (abfd, sec),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
#endif
/* Create the linker generated sections all the time so that the
@@ -2239,7 +2239,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
{
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
- bfd_get_filename (abfd), "R_PPC_EMB_SDAI16"));
+ bfd_archive_filename (abfd), "R_PPC_EMB_SDAI16"));
return false;
}
@@ -2273,7 +2273,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
{
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
- bfd_get_filename (abfd), "R_PPC_EMB_SDA2I16"));
+ bfd_archive_filename (abfd), "R_PPC_EMB_SDA2I16"));
return false;
}
@@ -2308,7 +2308,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
{
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
ppc_elf_howto_table[(int) ELF32_R_TYPE (rel->r_info)]->name));
return false;
}
@@ -2923,7 +2923,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef DEBUG
fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
(long) input_section->reloc_count,
(info->relocateable) ? " (relocatable)" : "");
@@ -2962,7 +2962,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| !ppc_elf_howto_table[(int) r_type])
{
(*_bfd_error_handler) (_("%s: unknown relocation type %d"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type);
bfd_set_error (bfd_error_bad_value);
@@ -3095,7 +3095,7 @@ ppc_elf_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 = 0;
}
@@ -3130,7 +3130,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
default:
(*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
@@ -3494,7 +3494,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& strcmp (name, ".sbss") != 0)
{
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
sym_name,
ppc_elf_howto_table[(int) r_type]->name,
name);
@@ -3515,7 +3515,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0)
{
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
sym_name,
ppc_elf_howto_table[(int) r_type]->name,
name);
@@ -3565,7 +3565,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
sym_name,
ppc_elf_howto_table[(int) r_type]->name,
name);
@@ -3631,7 +3631,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case (int) R_PPC_EMB_RELST_HA:
case (int) R_PPC_EMB_BIT_FLD:
(*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
ppc_elf_howto_table[(int) r_type]->name,
sym_name);
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 64e873c7b8e..088d5d162e4 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -1433,7 +1433,7 @@ elf_s390_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 = 0;
}
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index f8d29d1f9f1..6f94095c941 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -1096,7 +1096,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
if (laddr >= sec->_raw_size)
{
(*_bfd_error_handler) (_("%s: 0x%lx: warning: bad R_SH_USES offset"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
(unsigned long) irel->r_offset);
continue;
}
@@ -1108,7 +1108,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
(_("%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset, insn));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_offset, insn));
continue;
}
@@ -1125,7 +1125,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
(_("%s: 0x%lx: warning: bad R_SH_USES load offset"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
continue;
}
@@ -1140,7 +1140,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
(_("%s: 0x%lx: warning: could not find expected reloc"),
- bfd_get_filename (abfd), (unsigned long) paddr));
+ bfd_archive_filename (abfd), (unsigned long) paddr));
continue;
}
@@ -1176,7 +1176,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
(_("%s: 0x%lx: warning: symbol in unexpected section"),
- bfd_get_filename (abfd), (unsigned long) paddr));
+ bfd_archive_filename (abfd), (unsigned long) paddr));
continue;
}
@@ -1298,7 +1298,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
{
((*_bfd_error_handler)
(_("%s: 0x%lx: warning: could not find expected COUNT reloc"),
- bfd_get_filename (abfd), (unsigned long) paddr));
+ bfd_archive_filename (abfd), (unsigned long) paddr));
continue;
}
@@ -1307,7 +1307,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
if (irelcount->r_addend == 0)
{
((*_bfd_error_handler) (_("%s: 0x%lx: warning: bad count"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
(unsigned long) paddr));
continue;
}
@@ -1701,7 +1701,7 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
{
((*_bfd_error_handler)
(_("%s: 0x%lx: fatal: reloc overflow while relaxing"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -2091,7 +2091,7 @@ sh_elf_swap_insns (abfd, sec, relocs, contents, addr)
{
((*_bfd_error_handler)
(_("%s: 0x%lx: fatal: reloc overflow while relaxing"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+ bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -3103,7 +3103,7 @@ sh_elf_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 = 0;
}
@@ -3169,7 +3169,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
((*_bfd_error_handler)
(_("%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"),
- bfd_get_filename (input_section->owner),
+ bfd_archive_filename (input_section->owner),
(unsigned long) rel->r_offset));
bfd_set_error (bfd_error_bad_value);
return false;
@@ -4091,7 +4091,7 @@ sh_elf_merge_private_data (ibfd, obfd)
{
(*_bfd_error_handler)
("%s: uses %s instructions while previous modules use %s instructions",
- bfd_get_filename (ibfd),
+ bfd_archive_filename (ibfd),
EF_SH_HAS_DSP (new_flags) ? "dsp" : "floating point",
EF_SH_HAS_DSP (new_flags) ? "floating point" : "dsp");
bfd_set_error (bfd_error_bad_value);
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 93141a81898..c50e4458deb 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1535,7 +1535,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_FAIL ();
(*_bfd_error_handler)
(_("%s: probably compiled without -fPIC?"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -1988,7 +1988,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: compiled for a 64 bit system and target is 32 bit"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
else if ((ibfd->flags & DYNAMIC) == 0)
{
@@ -2002,7 +2002,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking little endian files with big endian files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
error = true;
}
previous_ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 0e9fbae80c3..b6570200489 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -590,7 +590,7 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
#ifdef DEBUG
fprintf (stderr, "v850_elf_check_relocs called for section %s in %s\n",
bfd_get_section_name (abfd, sec),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
#endif
dynobj = elf_hash_table (info)->dynobj;
@@ -1906,7 +1906,7 @@ v850_elf_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_V850_ARCH) != (out_flags & EF_V850_ARCH)
&& (in_flags & EF_V850_ARCH) != E_V850_ARCH)
_bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
return true;
}
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 00d8184bef3..4642baccceb 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1010,8 +1010,8 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
{
((*_bfd_error_handler)
("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
- bfd_get_filename (info->abfd), info->sec->name,
- (unsigned long)irel->r_offset));
+ bfd_archive_filename (info->abfd), info->sec->name,
+ (unsigned long) irel->r_offset));
return irel;
}
@@ -1307,7 +1307,7 @@ elf64_alpha_relax_without_lituse (info, symval, irel)
{
((*_bfd_error_handler)
("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
- bfd_get_filename (info->abfd), info->sec->name,
+ bfd_archive_filename (info->abfd), info->sec->name,
(unsigned long) irel->r_offset));
return true;
}
@@ -2907,7 +2907,7 @@ elf64_alpha_size_got_sections (output_bfd, info)
/* Yikes! A single object file has too many entries. */
(*_bfd_error_handler)
(_("%s: .got subsegment exceeds 64K (size %d)"),
- bfd_get_filename (i),
+ bfd_archive_filename (i),
alpha_elf_tdata (this_got)->total_got_entries * 8);
return false;
}
@@ -3461,7 +3461,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: gp-relative relocation against dynamic symbol %s"),
- bfd_get_filename (input_bfd), h->root.root.root.string);
+ bfd_archive_filename (input_bfd), h->root.root.root.string);
ret_val = false;
}
BFD_ASSERT(gp != 0);
@@ -3473,7 +3473,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: gp-relative relocation against dynamic symbol %s"),
- bfd_get_filename (input_bfd), h->root.root.root.string);
+ bfd_archive_filename (input_bfd), h->root.root.root.string);
ret_val = false;
}
BFD_ASSERT(gp != 0);
diff --git a/bfd/elf64-gen.c b/bfd/elf64-gen.c
index c3bfa9c7140..a58f6ac60c7 100644
--- a/bfd/elf64-gen.c
+++ b/bfd/elf64-gen.c
@@ -79,15 +79,9 @@ elf64_generic_link_add_symbols (abfd, info)
Elf_Internal_Ehdr *ehdrp;
ehdrp = elf_elfheader (abfd);
- if (abfd->my_archive)
- (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
- else
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
+ (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+ bfd_archive_filename (abfd),
+ ehdrp->e_machine);
bfd_set_error (bfd_error_wrong_format);
return false;
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 78e9815c497..4c6dbc8e65d 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -1454,7 +1454,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
else
msg = _("%s: compiled for a little endian system and target is big endian");
- (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
+ (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_wrong_format);
return false;
@@ -1488,7 +1488,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
&& (old_flags & EF_PPC_RELOCATABLE) != 0)
@@ -1496,7 +1496,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
/* The output is -mrelocatable-lib iff both the input files are. */
@@ -1523,7 +1523,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long) new_flags, (long) old_flags);
+ bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
}
if (error)
@@ -1632,7 +1632,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
#ifdef DEBUG
fprintf (stderr, "ppc64_elf_check_relocs called for section %s in %s\n",
bfd_get_section_name (abfd, sec),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
#endif
dynobj = elf_hash_table (info)->dynobj;
@@ -2670,7 +2670,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef DEBUG
fprintf (stderr, "ppc64_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_section_name (input_bfd, input_section),
(long) input_section->reloc_count,
(info->relocateable) ? " (relocatable)" : "");
@@ -2726,7 +2726,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| !ppc64_elf_howto_table[(int) r_type])
{
(*_bfd_error_handler) (_("%s: unknown relocation type %d"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = false;
@@ -2879,7 +2879,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (((relocation + addend) & 3) != 0)
{
(*_bfd_error_handler) (_("%s: error: relocation %s not a multiple of 4"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
howto->name);
bfd_set_error (bfd_error_bad_value);
ret = false;
@@ -2892,7 +2892,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
default:
(*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
@@ -3309,7 +3309,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case (int) R_PPC64_PLTGOT16_HI:
case (int) R_PPC64_PLTGOT16_HA:
(*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
ppc64_elf_howto_table[(int) r_type]->name,
sym_name);
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 7bc64292b5d..a8b71ddf914 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -1421,7 +1421,7 @@ elf_s390_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 = 0;
}
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index f5ba083a4ee..7a18d9b1e47 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -1269,7 +1269,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
default:
(*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"),
- bfd_get_filename(abfd),
+ bfd_archive_filename (abfd),
ELF64_R_TYPE_ID (rel->r_info));
return false;
}
@@ -1291,7 +1291,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
asection **secp ATTRIBUTE_UNUSED;
bfd_vma *valp ATTRIBUTE_UNUSED;
{
- static char *stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
+ static const char *const stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
if (ELF_ST_TYPE (sym->st_info) == STT_REGISTER)
{
@@ -1306,7 +1306,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
default:
(*_bfd_error_handler)
(_("%s: Only registers %%g[2367] can be declared using STT_REGISTER"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
return false;
}
@@ -1325,11 +1325,12 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (p->name != NULL && strcmp (p->name, *namep))
{
(*_bfd_error_handler)
- (_("Register %%g%d used incompatibly: "
- "previously declared in %s to %s, in %s redefined to %s"),
- (int)sym->st_value,
- bfd_get_filename (p->abfd), *p->name ? p->name : "#scratch",
- bfd_get_filename (abfd), **namep ? *namep : "#scratch");
+ (_("Register %%g%d used incompatibly: %s in %s"),
+ (int) sym->st_value,
+ **namep ? *namep : "#scratch", bfd_archive_filename (abfd));
+ (*_bfd_error_handler)
+ (_(" previously %s in %s"),
+ *p->name ? p->name : "#scratch", bfd_archive_filename (p->abfd));
return false;
}
@@ -1346,11 +1347,14 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
unsigned char type = h->type;
- if (type > STT_FUNC) type = 0;
+ if (type > STT_FUNC)
+ type = 0;
+ (*_bfd_error_handler)
+ (_("Symbol `%s' has differing types: %s in %s"),
+ *namep, "REGISTER", bfd_archive_filename (abfd));
(*_bfd_error_handler)
- (_("Symbol `%s' has differing types: "
- "previously %s, REGISTER in %s"),
- *namep, stt_types [type], bfd_get_filename (abfd));
+ (_(" previously %s in %s"),
+ stt_types[type], bfd_archive_filename (p->abfd));
return false;
}
@@ -1392,12 +1396,14 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
unsigned char type = ELF_ST_TYPE (sym->st_info);
- if (type > STT_FUNC) type = 0;
+ if (type > STT_FUNC)
+ type = 0;
+ (*_bfd_error_handler)
+ (_("Symbol `%s' has differing types: %s in %s"),
+ *namep, stt_types[type], bfd_archive_filename (abfd));
(*_bfd_error_handler)
- (_("Symbol `%s' has differing types: "
- "REGISTER in %s, %s in %s"),
- *namep, bfd_get_filename (p->abfd), stt_types [type],
- bfd_get_filename (abfd));
+ (_(" previously %s in %s"),
+ "REGISTER", bfd_archive_filename (p->abfd));
return false;
}
}
@@ -2272,7 +2278,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_FAIL ();
(*_bfd_error_handler)
(_("%s: probably compiled without -fPIC?"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -3002,7 +3008,7 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: linking UltraSPARC specific with HAL specific code"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
/* Choose the most restrictive memory ordering. */
old_mm = (old_flags & EF_SPARCV9_MM);
@@ -3021,7 +3027,7 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+ bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
}
elf_elfheader (obfd)->e_flags = old_flags;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 0b8d345703a..c86a50f1aa5 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1289,7 +1289,7 @@ elf64_x86_64_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 = 0;
}
diff --git a/bfd/elflink.c b/bfd/elflink.c
index a96e1758c74..05a2288f52f 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -431,10 +431,10 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
s->_raw_size += lsect->hole_size;
if (lsect->hole_offset > lsect->max_hole_offset)
{
- (*_bfd_error_handler) (_("%s: Section %s is already to large to put hole of %ld bytes in"),
+ (*_bfd_error_handler) (_("%s: Section %s is too large to add hole of %ld bytes"),
bfd_get_filename (abfd),
lsect->name,
- (long)lsect->hole_size);
+ (long) lsect->hole_size);
bfd_set_error (bfd_error_bad_value);
return (elf_linker_section_t *)0;
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 123bc8d4bfa..393f932b17c 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -1485,7 +1485,7 @@ elf_link_add_object_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: %s: invalid version %u (max %d)"),
- bfd_get_filename (abfd), name, vernum,
+ bfd_archive_filename (abfd), name, vernum,
elf_tdata (abfd)->dynverdef_hdr.sh_info);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1526,7 +1526,7 @@ elf_link_add_object_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: %s: invalid needed version %d"),
- bfd_get_filename (abfd), name, vernum);
+ bfd_archive_filename (abfd), name, vernum);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1647,7 +1647,7 @@ elf_link_add_object_symbols (abfd, info)
(*_bfd_error_handler)
(_("Warning: size of symbol `%s' changed from %lu to %lu in %s"),
name, (unsigned long) h->size, (unsigned long) sym.st_size,
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
h->size = sym.st_size;
}
@@ -1669,7 +1669,7 @@ elf_link_add_object_symbols (abfd, info)
(*_bfd_error_handler)
(_("Warning: type of symbol `%s' changed from %d to %d in %s"),
name, h->type, ELF_ST_TYPE (sym.st_info),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
h->type = ELF_ST_TYPE (sym.st_info);
}
@@ -1892,7 +1892,7 @@ elf_link_add_object_symbols (abfd, info)
do in the case above. */
(*_bfd_error_handler)
(_("%s: warning: unexpected redefinition of `%s'"),
- bfd_get_filename (abfd), shortname);
+ bfd_archive_filename (abfd), shortname);
}
else
{
@@ -6009,7 +6009,7 @@ elf_link_input_bfd (finfo, input_bfd)
if (isec->symbol->value != isym->st_value)
(*_bfd_error_handler)
(_("%s: invalid section symbol index 0x%x (%s) ignored"),
- bfd_get_filename (input_bfd), isym->st_shndx,
+ bfd_archive_filename (input_bfd), isym->st_shndx,
name);
continue;
}
@@ -7288,7 +7288,7 @@ elf_gc_record_vtinherit (abfd, sec, h, offset)
}
(*_bfd_error_handler) ("%s: %s+%lu: No symbol found for INHERIT",
- bfd_get_filename (abfd), sec->name,
+ bfd_archive_filename (abfd), sec->name,
(unsigned long) offset);
bfd_set_error (bfd_error_invalid_operation);
return false;
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index d8f1de765c1..0747b8767b8 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -3434,7 +3434,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: unknown relocation type %d"),
- bfd_get_filename (input_bfd), (int)r_type);
+ bfd_archive_filename (input_bfd), (int)r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = false;
continue;
@@ -3594,7 +3594,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
shared libraries. Hork. */
(*_bfd_error_handler)
(_("%s: linking non-pic code in a shared library"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
@@ -3627,7 +3627,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: @gprel relocation against dynamic symbol %s"),
- bfd_get_filename (input_bfd), h->root.root.string);
+ bfd_archive_filename (input_bfd), h->root.root.string);
ret_val = false;
continue;
}
@@ -3765,7 +3765,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: dynamic relocation against speculation fixup"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
@@ -3773,7 +3773,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: speculation fixup against undefined weak symbol"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
@@ -4254,7 +4254,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking trap-on-NULL-dereference with non-trapping files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4263,7 +4263,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking big-endian files with little-endian files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4272,7 +4272,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking 64-bit files with 32-bit files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4281,7 +4281,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking constant-gp files with non-constant-gp files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4291,7 +4291,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking auto-pic files with non-auto-pic files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 42a3d403c04..546f12cbdb9 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -875,7 +875,7 @@ ieee_slurp_external_symbols (abfd)
default:
(*_bfd_error_handler)
(_("%s: unimplemented ATI record %u for symbol %u"),
- bfd_get_filename (abfd), symbol_attribute_def,
+ bfd_archive_filename (abfd), symbol_attribute_def,
symbol_name_index);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -900,7 +900,7 @@ ieee_slurp_external_symbols (abfd)
{
(*_bfd_error_handler)
(_("%s: unexpected ATN type %d in external part"),
- bfd_get_filename (abfd), (int) value);
+ bfd_archive_filename (abfd), (int) value);
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -922,7 +922,7 @@ ieee_slurp_external_symbols (abfd)
default:
(*_bfd_error_handler)
(_("%s: unexpected type after ATN"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/ihex.c b/bfd/ihex.c
index fbfe63c9209..9aacdfce4d5 100644
--- a/bfd/ihex.c
+++ b/bfd/ihex.c
@@ -257,7 +257,7 @@ ihex_bad_byte (abfd, lineno, c, error)
}
(*_bfd_error_handler)
(_("%s:%d: unexpected character `%s' in Intel Hex file\n"),
- bfd_get_filename (abfd), lineno, buf);
+ bfd_archive_filename (abfd), lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
@@ -367,7 +367,7 @@ ihex_scan (abfd)
{
(*_bfd_error_handler)
(_("%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
- bfd_get_filename (abfd), lineno,
+ bfd_archive_filename (abfd), lineno,
(- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -421,7 +421,7 @@ ihex_scan (abfd)
{
(*_bfd_error_handler)
(_("%s:%u: bad extended address record length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -438,7 +438,7 @@ ihex_scan (abfd)
{
(*_bfd_error_handler)
(_("%s:%u: bad extended start address length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -455,7 +455,7 @@ ihex_scan (abfd)
{
(*_bfd_error_handler)
(_("%s:%u: bad extended linear address record length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -472,7 +472,7 @@ ihex_scan (abfd)
{
(*_bfd_error_handler)
(_("%s:%u: bad extended linear start address length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -489,7 +489,7 @@ ihex_scan (abfd)
default:
(*_bfd_error_handler)
(_("%s:%u: unrecognized ihex type %u in Intel Hex file\n"),
- bfd_get_filename (abfd), lineno, type);
+ bfd_archive_filename (abfd), lineno, type);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -609,7 +609,7 @@ ihex_read_section (abfd, section, contents)
{
(*_bfd_error_handler)
(_("%s: internal error in ihex_read_section"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -644,7 +644,7 @@ ihex_read_section (abfd, section, contents)
{
(*_bfd_error_handler)
(_("%s: bad section length in ihex_read_section"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 64a7614277e..f7320cc4e2f 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -1438,7 +1438,7 @@ _bfd_generic_verify_endian_match (ibfd, obfd)
else
msg = _("%s: compiled for a little endian system and target is big endian");
- (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
+ (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_wrong_format);
return false;
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 5c1d4d21efd..01cfd05f5d1 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1667,7 +1667,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
file. */
(*_bfd_error_handler)
("%s: can not represent section for symbol `%s' in a.out object file format",
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
cache_ptr->name != NULL ? cache_ptr->name : "*unknown*");
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
@@ -1695,7 +1695,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
{
(*_bfd_error_handler)
("%s: can not represent section `%s' in a.out object file format",
- bfd_get_filename (abfd), bfd_get_section_name (abfd, sec));
+ bfd_archive_filename (abfd), bfd_get_section_name (abfd, sec));
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
}
diff --git a/bfd/pe-mips.c b/bfd/pe-mips.c
index 82b1a05e007..a5885d08e99 100644
--- a/bfd/pe-mips.c
+++ b/bfd/pe-mips.c
@@ -657,7 +657,7 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
{
(*_bfd_error_handler) (_("\
%s: `ld -r' not supported with PE MIPS objects\n"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -792,7 +792,7 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
*/
#define UI(x) (*_bfd_error_handler) (_("%s: unimplemented %s\n"), \
- bfd_get_filename (input_bfd), x); \
+ bfd_archive_filename (input_bfd), x); \
bfd_set_error (bfd_error_bad_value);
switch (rel->r_type)
@@ -818,7 +818,7 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
if ((src & 0xf0000000) != (targ & 0xf0000000))
{
(*_bfd_error_handler) (_("%s: jump too far away\n"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -845,7 +845,7 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
break;
default:
(*_bfd_error_handler) (_("%s: bad pair/reflo after refhi\n"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 04300591f1c..323b30d89d0 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -783,12 +783,12 @@ pe_ILF_build_a_bfd (bfd * abfd,
case IMPORT_CONST:
/* XXX code yet to be written. */
_bfd_error_handler (_("%s: Unhandled import type; %x"),
- bfd_get_filename (abfd), import_type);
+ bfd_archive_filename (abfd), import_type);
return false;
default:
_bfd_error_handler (_("%s: Unrecognised import type; %x"),
- bfd_get_filename (abfd), import_type);
+ bfd_archive_filename (abfd), import_type);
return false;
}
@@ -802,7 +802,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
default:
_bfd_error_handler (_("%s: Unrecognised import name type; %x"),
- bfd_get_filename (abfd), import_name_type);
+ bfd_archive_filename (abfd), import_name_type);
return false;
}
@@ -1160,7 +1160,7 @@ pe_ILF_object_p (bfd * abfd)
_bfd_error_handler
(
_("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
- bfd_get_filename (abfd), machine);
+ bfd_archive_filename (abfd), machine);
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -1172,7 +1172,7 @@ _("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
_bfd_error_handler
(
_("%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"),
- bfd_get_filename (abfd), machine);
+ bfd_archive_filename (abfd), machine);
bfd_set_error (bfd_error_wrong_format);
return NULL;
@@ -1189,7 +1189,7 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
{
_bfd_error_handler
(_("%s: size field is zero in Import Library Format header"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -1217,7 +1217,7 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
{
_bfd_error_handler
(_("%s: string not null terminated in ILF object file."),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_malformed_archive);
return NULL;
diff --git a/bfd/srec.c b/bfd/srec.c
index 54706acb8c5..5cb83caedd4 100644
--- a/bfd/srec.c
+++ b/bfd/srec.c
@@ -300,7 +300,7 @@ srec_bad_byte (abfd, lineno, c, error)
}
(*_bfd_error_handler)
(_("%s:%d: Unexpected character `%s' in S-record file\n"),
- bfd_get_filename (abfd), lineno, buf);
+ bfd_archive_filename (abfd), lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 3a49918130b..af6ebb1818e 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -1239,7 +1239,7 @@ xcoff_link_add_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: `%s' has line numbers but no enclosing section"),
- bfd_get_filename (abfd), name);
+ bfd_archive_filename (abfd), name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1292,7 +1292,7 @@ xcoff_link_add_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: class %d symbol `%s' has no aux entries"),
- bfd_get_filename (abfd), sym.n_sclass, name);
+ bfd_archive_filename (abfd), sym.n_sclass, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1315,7 +1315,7 @@ xcoff_link_add_symbols (abfd, info)
default:
(*_bfd_error_handler)
(_("%s: symbol `%s' has unrecognized csect type %d"),
- bfd_get_filename (abfd), name, smtyp);
+ bfd_archive_filename (abfd), name, smtyp);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1327,7 +1327,7 @@ xcoff_link_add_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
- bfd_get_filename (abfd), name, sym.n_sclass, sym.n_scnum,
+ bfd_archive_filename (abfd), name, sym.n_sclass, sym.n_scnum,
aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1363,7 +1363,7 @@ xcoff_link_add_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: XMC_TC0 symbol `%s' is class %d scnlen %d"),
- bfd_get_filename (abfd), name, sym.n_sclass,
+ bfd_archive_filename (abfd), name, sym.n_sclass,
aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1515,7 +1515,7 @@ xcoff_link_add_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: csect `%s' not in enclosing section"),
- bfd_get_filename (abfd), name);
+ bfd_archive_filename (abfd), name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1622,7 +1622,7 @@ xcoff_link_add_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: misplaced XTY_LD `%s'"),
- bfd_get_filename (abfd), name);
+ bfd_archive_filename (abfd), name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1946,7 +1946,7 @@ xcoff_link_add_symbols (abfd, info)
{
(*_bfd_error_handler)
(_("%s: reloc %s:%d not in csect"),
- bfd_get_filename (abfd), o->name, i);
+ bfd_archive_filename (abfd), o->name, i);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -5259,7 +5259,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
(*_bfd_error_handler)
(_("%s: loader reloc in unrecognized section `%s'"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
sec->name);
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
@@ -5281,7 +5281,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
(*_bfd_error_handler)
(_("%s: `%s' in loader reloc but not loader sym"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -5296,7 +5296,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
(*_bfd_error_handler)
(_("%s: loader reloc in read-only section %s"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_get_section_name (finfo->output_bfd,
o->output_section));
bfd_set_error (bfd_error_invalid_operation);