* 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-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
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;
}
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);
}
{
(*_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);
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));
{
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);
+}
\f
/*
SECTION
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);
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);
_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;
_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"));
}
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;
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;
}
_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
);
/* 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);
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);
/* 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));
}
}
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;
}
/* 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);
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);
&& 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;
{
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;
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",
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:
{
(*_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;
{
(*_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;
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",
(*_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;
}
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:
{
(*_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;
{
(*_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);
}
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;
}
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
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;
}
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
{
(*_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;
}
{
(*_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;
}
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;
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:
{
(*_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;
{
(*_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);
}
{
(*_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;
}
}
{
(*_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;
}
{
(*_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;
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);
(*_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));
}
{
(*_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;
}
{
(*_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;
}
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;
(*_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
{
((*_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;
{
(*_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
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;
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;
{
(*_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;
}
{
(*_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;
}
{
(*_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"
{
((*_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);
}
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;
}
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;
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;
}
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);
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);
&& 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;
}
&& 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;
/* 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
/* 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
{
(*_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;
}
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
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;
}
/* 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;
}
{
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;
}
+ 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;
}
{
(*_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));
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]"),
{
(*_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));
{
(*_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);
&& (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. */
((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;
}
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;
{
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);
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;
}
{
(*_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);
{
(*_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);
{
(*_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;
{
(*_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. */
else
{
(*_bfd_error_handler) (_("%s: duplicate export stub %s"),
- bfd_get_filename (input_bfd),
- stub_name);
+ bfd_archive_filename (input_bfd),
+ stub_name);
}
}
}
#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);
{
(*_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);
{
(*_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
{
{
(*_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;
{
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;
#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;
#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
|| !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;
}
}
- 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;
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;
>= 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];
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;
}
|| 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);
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;
}
&& (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);
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;
}
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;
{
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;
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);
#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)" : "");
|| ! 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);
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);
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;
}
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;
}
{
(*_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;
}
}
{
(*_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;
{
(*_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;
{
(*_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;
}
{
(*_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);
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;
}
{
(*_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;
}
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)
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. */
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)
#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
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
#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)" : "");
|| !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);
{
(*_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;
}
{
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);
&& 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);
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);
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);
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);
{
(*_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;
}
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;
}
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
{
((*_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;
}
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;
}
{
((*_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;
}
{
((*_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;
}
{
(*_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;
}
{
((*_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;
{
(*_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);
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;
}
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)
{
{
(*_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;
#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;
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;
}
{
((*_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;
}
{
((*_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;
}
/* 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;
}
{
(*_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);
{
(*_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);
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;
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;
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)
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. */
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)
#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;
#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)" : "");
|| !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;
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;
{
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);
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);
{
(*_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;
}
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;
}
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)
{
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;
}
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;
}
{
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;
}
{
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;
}
}
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;
}
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);
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;
{
(*_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;
}
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;
{
(*_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;
{
(*_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;
}
(*_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;
}
(*_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);
}
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
{
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;
}
}
(*_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;
{
(*_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;
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;
}
{
(*_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;
}
{
(*_bfd_error_handler)
(_("%s: dynamic relocation against speculation fixup"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
{
(*_bfd_error_handler)
(_("%s: speculation fixup against undefined weak symbol"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
{
(*_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;
{
(*_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;
{
(*_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;
{
(*_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;
{
(*_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;
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;
{
(*_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;
}
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;
}
}
(*_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);
}
}
{
(*_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;
{
(*_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;
}
{
(*_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;
}
{
(*_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;
}
{
(*_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;
}
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;
}
{
(*_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;
}
{
(*_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;
}
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;
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;
{
(*_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;
}
{
(*_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;
}
*/
#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)
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;
}
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;
}
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;
}
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;
}
_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;
_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;
{
_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;
{
_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;
}
(*_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);
}
}
{
(*_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;
}
{
(*_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;
}
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;
{
(*_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;
{
(*_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;
{
(*_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;
}
{
(*_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;
}
{
(*_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;
}
{
(*_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;
{
(*_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;
{
(*_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);