Use %A and %B in more error messages

* aoutx.h: Use %B and %A in error messages throughout file.
	* aout-cris.c: Likewise.
	* archive.c: Likewise.
	* binary.c: Likewise.
	* coff-rs6000.c: Likewise.
	* coff-tic4x.c: Likewise.
	* coffcode.h: Likewise.
	* coffgen.c: Likewise.
	* cofflink.c: Likewise.
	* coffswap.h: Likewise.
	* cpu-arm.c: Likewise.
	* elf-eh-frame.c: Likewise.
	* elf-m10300.c: Likewise.
	* elf.c: Likewise.
	* elf32-arc.c: Likewise.
	* elf32-arm.c: Likewise.
	* elf32-bfin.c: Likewise.
	* elf32-frv.c: Likewise.
	* elf32-iq2000.c: Likewise.
	* elf32-m32c.c: Likewise.
	* elf32-microblaze.c: Likewise.
	* elf32-nds32.c: Likewise.
	* elf32-rl78.c: Likewise.
	* elf32-rx.c: Likewise.
	* elf32-score.c: Likewise.
	* elf32-score7.c: Likewise.
	* elf32-sh64.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf32-vax.c: Likewise.
	* elf32-visium.c: Likewise.
	* elf64-ia64-vms.c: Likewise.
	* elf64-mmix.c: Likewise.
	* elf64-sh64.c: Likewise.
	* elfcode.h: Likewise.
	* elfnn-aarch64.c: Likewise.
	* elfnn-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	* hpux-core.c: Likewise.
	* ieee.c: Likewise.
	* ihex.c: Likewise.
	* linker.c: Likewise.
	* merge.c: Likewise.
	* mmo.c: Likewise.
	* oasys.c: Likewise.
	* pdp11.c: Likewise.
	* peXXigen.c: Likewise.
	* rs6000-core.c: Likewise.
	* vms-alpha.c: Likewise.
	* xcofflink.c: Likewise.
This commit is contained in:
Alan Modra 2017-04-13 13:20:15 +09:30
parent c08bb8dd9b
commit dae82561a2
50 changed files with 341 additions and 314 deletions

View file

@ -1,3 +1,55 @@
2017-04-13 Alan Modra <amodra@gmail.com>
* aoutx.h: Use %B and %A in error messages throughout file.
* aout-cris.c: Likewise.
* archive.c: Likewise.
* binary.c: Likewise.
* coff-rs6000.c: Likewise.
* coff-tic4x.c: Likewise.
* coffcode.h: Likewise.
* coffgen.c: Likewise.
* cofflink.c: Likewise.
* coffswap.h: Likewise.
* cpu-arm.c: Likewise.
* elf-eh-frame.c: Likewise.
* elf-m10300.c: Likewise.
* elf.c: Likewise.
* elf32-arc.c: Likewise.
* elf32-arm.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-frv.c: Likewise.
* elf32-iq2000.c: Likewise.
* elf32-m32c.c: Likewise.
* elf32-microblaze.c: Likewise.
* elf32-nds32.c: Likewise.
* elf32-rl78.c: Likewise.
* elf32-rx.c: Likewise.
* elf32-score.c: Likewise.
* elf32-score7.c: Likewise.
* elf32-sh64.c: Likewise.
* elf32-v850.c: Likewise.
* elf32-vax.c: Likewise.
* elf32-visium.c: Likewise.
* elf64-ia64-vms.c: Likewise.
* elf64-mmix.c: Likewise.
* elf64-sh64.c: Likewise.
* elfcode.h: Likewise.
* elfnn-aarch64.c: Likewise.
* elfnn-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* hpux-core.c: Likewise.
* ieee.c: Likewise.
* ihex.c: Likewise.
* linker.c: Likewise.
* merge.c: Likewise.
* mmo.c: Likewise.
* oasys.c: Likewise.
* pdp11.c: Likewise.
* peXXigen.c: Likewise.
* rs6000-core.c: Likewise.
* vms-alpha.c: Likewise.
* xcofflink.c: Likewise.
2017-04-13 Alan Modra <amodra@gmail.com> 2017-04-13 Alan Modra <amodra@gmail.com>
* bfd.c (PRINT_TYPE): Define. * bfd.c (PRINT_TYPE): Define.

View file

@ -197,8 +197,8 @@ MY (swap_ext_reloc_out) (bfd *abfd,
if (r_type > 2) if (r_type > 2)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%s: Invalid relocation type exported: %d"), _bfd_error_handler (_("%B: Invalid relocation type exported: %d"),
bfd_get_filename (abfd), r_type); abfd, r_type);
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
} }

View file

@ -1279,8 +1279,8 @@ NAME (aout, set_section_contents) (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: can not represent section `%s' in a.out object file format"), (_("%B: can not represent section `%A' in a.out object file format"),
bfd_get_filename (abfd), bfd_get_section_name (abfd, section)); abfd, section);
bfd_set_error (bfd_error_nonrepresentable_section); bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE; return FALSE;
} }
@ -1580,9 +1580,9 @@ translate_to_native_sym_flags (bfd *abfd,
file. */ file. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: can not represent section for symbol `%s' in a.out " (_("%B: can not represent section for symbol `%s' in a.out "
"object file format"), "object file format"),
bfd_get_filename (abfd), abfd,
cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*")); cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*"));
bfd_set_error (bfd_error_nonrepresentable_section); bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE; return FALSE;
@ -1616,8 +1616,8 @@ translate_to_native_sym_flags (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: can not represent section `%s' in a.out object file format"), (_("%B: can not represent section `%A' in a.out object file format"),
bfd_get_filename (abfd), bfd_get_section_name (abfd, sec)); abfd, sec);
bfd_set_error (bfd_error_nonrepresentable_section); bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE; return FALSE;
} }
@ -5419,9 +5419,8 @@ NAME (aout, final_link) (bfd *abfd,
by the reloc size. */ by the reloc size. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: relocatable link from %s to %s not supported"), (_("%B: relocatable link from %s to %s not supported"),
bfd_get_filename (abfd), abfd, sub->xvec->name, abfd->xvec->name);
sub->xvec->name, abfd->xvec->name);
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
goto error_return; goto error_return;
} }

View file

@ -2402,8 +2402,8 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
if (strcmp (syms[src_count]->name, "__gnu_lto_slim") == 0) if (strcmp (syms[src_count]->name, "__gnu_lto_slim") == 0)
_bfd_error_handler _bfd_error_handler
(_("%s: plugin needed to handle lto object"), (_("%B: plugin needed to handle lto object"),
bfd_get_filename (current)); current);
namelen = strlen (syms[src_count]->name); namelen = strlen (syms[src_count]->name);
amt = sizeof (char *); amt = sizeof (char *);
map[orl_count].name = (char **) bfd_alloc (arch, amt); map[orl_count].name = (char **) bfd_alloc (arch, amt);

View file

@ -271,10 +271,9 @@ binary_set_section_contents (bfd *abfd,
if (s->filepos < 0) if (s->filepos < 0)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("Warning: Writing section `%s' at huge (ie negative) " (_("warning: writing section `%A' at huge (ie negative) "
"file offset 0x%lx."), "file offset 0x%lx."),
bfd_get_section_name (abfd, s), s, (unsigned long) s->filepos);
(unsigned long) s->filepos);
} }
abfd->output_has_begun = TRUE; abfd->output_has_begun = TRUE;

View file

@ -2738,8 +2738,8 @@ xcoff_reloc_type_fail (bfd *input_bfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("%s: unsupported relocation type 0x%02x"), (_("%B: unsupported relocation type 0x%02x"),
bfd_get_filename (input_bfd), (unsigned int) rel->r_type); input_bfd, (unsigned int) rel->r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -2824,9 +2824,8 @@ xcoff_reloc_type_toc (bfd *input_bfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"), (_("%B: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
bfd_get_filename (input_bfd), rel->r_vaddr, input_bfd, rel->r_vaddr, h->root.root.string);
h->root.root.string);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View file

@ -224,8 +224,8 @@ tic4x_reloc_processing (arelent *relent,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("%s: warning: illegal symbol index %ld in relocs"), (_("%B: warning: illegal symbol index %ld in relocs"),
bfd_get_filename (abfd), reloc->r_symndx); abfd, reloc->r_symndx);
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL; ptr = NULL;
} }

View file

@ -1942,8 +1942,8 @@ coff_set_alignment_hook (bfd * abfd ATTRIBUTE_UNUSED,
} }
else if (hdr->s_nreloc == 0xffff) else if (hdr->s_nreloc == 0xffff)
_bfd_error_handler _bfd_error_handler
(_("%s: warning: claims to have 0xffff relocs, without overflow"), (_("%B: warning: claims to have 0xffff relocs, without overflow"),
bfd_get_filename (abfd)); abfd);
} }
#undef ALIGN_SET #undef ALIGN_SET
#undef ELIFALIGN_SET #undef ELIFALIGN_SET
@ -3767,8 +3767,8 @@ coff_write_object_contents (bfd * abfd)
bfd_set_error (bfd_error_file_too_big); bfd_set_error (bfd_error_file_too_big);
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%B: section %s: string table overflow at offset %ld"), (_("%B: section %A: string table overflow at offset %ld"),
abfd, current->name, string_size); abfd, current, string_size);
return FALSE; return FALSE;
} }

View file

@ -3004,7 +3004,8 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
if (info->print_gc_sections && o->size != 0) if (info->print_gc_sections && o->size != 0)
/* xgettext: c-format */ /* xgettext: c-format */
_bfd_error_handler (_("Removing unused section '%s' in file '%B'"), sub, o->name); _bfd_error_handler (_("Removing unused section '%A' in file '%B'"),
o, sub);
#if 0 #if 0
/* But we also have to update some of the relocation /* But we also have to update some of the relocation

View file

@ -2727,20 +2727,16 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
|| bfd_link_relocatable (flaginfo->info))) || bfd_link_relocatable (flaginfo->info)))
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("%s: %s: reloc overflow: 0x%lx > 0xffff"), (_("%B: %A: reloc overflow: 0x%lx > 0xffff"),
bfd_get_filename (output_bfd), output_bfd, sec, sec->reloc_count);
bfd_get_section_name (output_bfd, sec),
sec->reloc_count);
if (sec->lineno_count > 0xffff if (sec->lineno_count > 0xffff
&& (! obj_pe (output_bfd) && (! obj_pe (output_bfd)
|| bfd_link_relocatable (flaginfo->info))) || bfd_link_relocatable (flaginfo->info)))
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"), (_("%B: warning: %A: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (output_bfd), output_bfd, sec, sec->lineno_count);
bfd_get_section_name (output_bfd, sec),
sec->lineno_count);
auxp->x_scn.x_nreloc = sec->reloc_count; auxp->x_scn.x_nreloc = sec->reloc_count;
auxp->x_scn.x_nlinno = sec->lineno_count; auxp->x_scn.x_nlinno = sec->lineno_count;

View file

@ -808,9 +808,8 @@ coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
buf[sizeof (scnhdr_int->s_name)] = '\0'; buf[sizeof (scnhdr_int->s_name)] = '\0';
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"), (_("%B: warning: %s: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd), abfd, buf, scnhdr_int->s_nlnno);
buf, scnhdr_int->s_nlnno);
PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
} }
@ -823,9 +822,8 @@ coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
buf[sizeof (scnhdr_int->s_name)] = '\0'; buf[sizeof (scnhdr_int->s_name)] = '\0';
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%s: %s: reloc overflow: 0x%lx > 0xffff"), _bfd_error_handler (_("%B: %s: reloc overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd), abfd, buf, scnhdr_int->s_nreloc);
buf, scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
ret = 0; ret = 0;

View file

@ -335,8 +335,8 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("warning: unable to update contents of %s section in %s"), (_("warning: unable to update contents of %s section in %B"),
note_section, bfd_get_filename (abfd)); note_section, abfd);
goto FAIL; goto FAIL;
} }
} }

View file

@ -1724,7 +1724,7 @@ _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info,
if (addr <= last_addr) if (addr <= last_addr)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%B: %s not in order"), sec->owner, sec->name); _bfd_error_handler (_("%B: %A not in order"), sec->owner, sec);
return FALSE; return FALSE;
} }
@ -1738,16 +1738,16 @@ _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info,
if (addr & 1) if (addr & 1)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%B: %s invalid input section size"), _bfd_error_handler (_("%B: %A invalid input section size"),
sec->owner, sec->name); sec->owner, sec);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
if (last_addr >= addr + sec->rawsize) if (last_addr >= addr + sec->rawsize)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%B: %s points past end of text section"), _bfd_error_handler (_("%B: %A points past end of text section"),
sec->owner, sec->name); sec->owner, sec);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -2165,8 +2165,8 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *info)
if (sec->output_section != osec) if (sec->output_section != osec)
{ {
_bfd_error_handler _bfd_error_handler
(_("Invalid output section for .eh_frame_entry: %s"), (_("Invalid output section for .eh_frame_entry: %A"),
sec->output_section->name); sec->output_section);
return FALSE; return FALSE;
} }
sec->output_offset = offset; sec->output_offset = offset;
@ -2188,7 +2188,7 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *info)
if (i != 0) if (i != 0)
{ {
_bfd_error_handler _bfd_error_handler
(_("Invalid contents in %s section"), osec->name); (_("Invalid contents in %A section"), osec);
return FALSE; return FALSE;
} }

View file

@ -1025,8 +1025,8 @@ mn10300_do_tls_transition (bfd * input_bfd,
default: default:
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: Unsupported transition from %s to %s"), (_("%B: Unsupported transition from %s to %s"),
bfd_get_filename (input_bfd), input_bfd,
elf_mn10300_howto_table[r_type].name, elf_mn10300_howto_table[r_type].name,
elf_mn10300_howto_table[tls_r_type].name); elf_mn10300_howto_table[tls_r_type].name);
break; break;

View file

@ -894,14 +894,14 @@ _bfd_elf_setup_sections (bfd *abfd)
/* There are some unknown sections in the group. */ /* There are some unknown sections in the group. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%B: unknown [%d] section `%s' in group [%s]"), (_("%B: unknown [%d] section `%s' in group [%A]"),
abfd, abfd,
(unsigned int) idx->shdr->sh_type, (unsigned int) idx->shdr->sh_type,
bfd_elf_string_from_elf_section (abfd, bfd_elf_string_from_elf_section (abfd,
(elf_elfheader (abfd) (elf_elfheader (abfd)
->e_shstrndx), ->e_shstrndx),
idx->shdr->sh_name), idx->shdr->sh_name),
shdr->bfd_section->name); shdr->bfd_section);
result = FALSE; result = FALSE;
} }
} }

View file

@ -565,8 +565,8 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("ERROR: Attempting to link %B " _bfd_error_handler (_("ERROR: Attempting to link %B "
"with a binary %s of different architecture"), "with a binary %B of different architecture"),
ibfd, bfd_get_filename (obfd)); ibfd, obfd);
return FALSE; return FALSE;
} }
else if (in_flags != out_flags) else if (in_flags != out_flags)
@ -574,9 +574,9 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
/* Warn if different flags. */ /* Warn if different flags. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: uses different e_flags (0x%lx) fields than " (_("%B: uses different e_flags (0x%lx) fields than "
"previous modules (0x%lx)"), "previous modules (0x%lx)"),
bfd_get_filename (ibfd), (long)in_flags, (long)out_flags); ibfd, (long) in_flags, (long) out_flags);
if (in_flags && out_flags) if (in_flags && out_flags)
return FALSE; return FALSE;
/* MWDT doesnt set the eflags hence make sure we choose the /* MWDT doesnt set the eflags hence make sure we choose the

View file

@ -4493,7 +4493,7 @@ elf32_arm_add_stub (const char *stub_name, asection *section,
{ {
if (section == NULL) if (section == NULL)
section = stub_sec; section = stub_sec;
_bfd_error_handler (_("%s: cannot create stub entry %s"), _bfd_error_handler (_("%B: cannot create stub entry %s"),
section->owner, stub_name); section->owner, stub_name);
return NULL; return NULL;
} }
@ -6630,7 +6630,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
TRUE, FALSE); TRUE, FALSE);
if (stub_entry == NULL) if (stub_entry == NULL)
{ {
_bfd_error_handler (_("%s: cannot create stub entry %s"), _bfd_error_handler (_("%B: cannot create stub entry %s"),
section->owner, stub_name); section->owner, stub_name);
return FALSE; return FALSE;
} }
@ -16023,8 +16023,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
if (!bfd_elf32_arm_process_before_allocation (ibfd, info) if (!bfd_elf32_arm_process_before_allocation (ibfd, info)
|| !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info) || !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info)
|| !bfd_elf32_arm_stm32l4xx_erratum_scan (ibfd, info)) || !bfd_elf32_arm_stm32l4xx_erratum_scan (ibfd, info))
_bfd_error_handler (_("Errors encountered processing file %s"), _bfd_error_handler (_("Errors encountered processing file %B"), ibfd);
ibfd->filename);
} }
/* Allocate space for the glue sections now that we've sized them. */ /* Allocate space for the glue sections now that we've sized them. */

View file

@ -4949,9 +4949,8 @@ elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
if (0) if (0)
#endif #endif
_bfd_error_handler _bfd_error_handler
("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s", ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %B",
old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no", old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no", ibfd);
bfd_get_filename (ibfd));
if (!elf_flags_init (obfd)) /* First call, no flags set. */ if (!elf_flags_init (obfd)) /* First call, no flags set. */
{ {
@ -4964,12 +4963,12 @@ elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
if (IS_FDPIC (obfd)) if (IS_FDPIC (obfd))
_bfd_error_handler _bfd_error_handler
(_("%s: cannot link non-fdpic object file into fdpic executable"), (_("%B: cannot link non-fdpic object file into fdpic executable"),
bfd_get_filename (ibfd)); ibfd);
else else
_bfd_error_handler _bfd_error_handler
(_("%s: cannot link fdpic object file into non-fdpic executable"), (_("%B: cannot link fdpic object file into non-fdpic executable"),
bfd_get_filename (ibfd)); ibfd);
} }
if (error) if (error)

View file

@ -6507,9 +6507,9 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: compiled with %s and linked with modules that use non-pic relocations"), (_("%B: compiled with %s and linked with modules"
bfd_get_filename (ibfd), " that use non-pic relocations"),
(new_flags & EF_FRV_BIGPIC) ? "-fPIC" : "-fpic"); ibfd, (new_flags & EF_FRV_BIGPIC) ? "-fPIC" : "-fpic");
#endif #endif
} }
} }
@ -6561,8 +6561,8 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: compiled with %s and linked with modules compiled with %s"), (_("%B: compiled with %s and linked with modules compiled with %s"),
bfd_get_filename (ibfd), new_opt, old_opt); ibfd, new_opt, old_opt);
} }
/* Warn about any other mismatches */ /* Warn about any other mismatches */
@ -6574,8 +6574,9 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"), (_("%B: uses different unknown e_flags (0x%lx) fields"
bfd_get_filename (ibfd), (long)new_partial, (long)old_partial); " than previous modules (0x%lx)"),
ibfd, (long) new_partial, (long) old_partial);
} }
} }
@ -6595,12 +6596,12 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
if (IS_FDPIC (obfd)) if (IS_FDPIC (obfd))
_bfd_error_handler _bfd_error_handler
(_("%s: cannot link non-fdpic object file into fdpic executable"), (_("%B: cannot link non-fdpic object file into fdpic executable"),
bfd_get_filename (ibfd)); ibfd);
else else
_bfd_error_handler _bfd_error_handler
(_("%s: cannot link fdpic object file into non-fdpic executable"), (_("%B: cannot link fdpic object file into non-fdpic executable"),
bfd_get_filename (ibfd)); ibfd);
} }
if (error) if (error)

View file

@ -829,8 +829,8 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: compiled with %s and linked with modules compiled with %s"), (_("%B: compiled with %s and linked with modules compiled with %s"),
bfd_get_filename (ibfd), new_opt, old_opt); ibfd, new_opt, old_opt);
} }
new_flags &= ~ EF_IQ2000_ALL_FLAGS; new_flags &= ~ EF_IQ2000_ALL_FLAGS;
@ -843,8 +843,8 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"), (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
bfd_get_filename (ibfd), (long)new_flags, (long)old_flags); ibfd, (long)new_flags, (long)old_flags);
} }
} }

View file

@ -874,8 +874,8 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: compiled with %s and linked with modules compiled with %s"), (_("%B: compiled with %s and linked with modules compiled with %s"),
bfd_get_filename (ibfd), new_opt, old_opt); ibfd, new_opt, old_opt);
} }
new_flags &= ~ EF_M32C_ALL_FLAGS; new_flags &= ~ EF_M32C_ALL_FLAGS;
@ -887,8 +887,9 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
error = TRUE; error = TRUE;
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"), (_("%B: uses different e_flags (0x%lx) fields"
bfd_get_filename (ibfd), (long)new_flags, (long)old_flags); " than previous modules (0x%lx)"),
ibfd, (long) new_flags, (long) old_flags);
} }
} }

View file

@ -949,8 +949,8 @@ microblaze_elf_relocate_section (bfd *output_bfd,
if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max) if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%s: unknown relocation type %d"), _bfd_error_handler (_("%B: unknown relocation type %d"),
bfd_get_filename (input_bfd), (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret = FALSE; ret = FALSE;
continue; continue;
@ -1077,12 +1077,12 @@ microblaze_elf_relocate_section (bfd *output_bfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: The target (%s) of an %s relocation " (_("%B: The target (%s) of an %s relocation"
"is in the wrong section (%s)"), " is in the wrong section (%A)"),
bfd_get_filename (input_bfd), input_bfd,
sym_name, sym_name,
microblaze_elf_howto_table[(int) r_type]->name, microblaze_elf_howto_table[(int) r_type]->name,
bfd_get_section_name (sec->owner, sec)); sec);
/*bfd_set_error (bfd_error_bad_value); ??? why? */ /*bfd_set_error (bfd_error_bad_value); ??? why? */
ret = FALSE; ret = FALSE;
continue; continue;
@ -1125,12 +1125,12 @@ microblaze_elf_relocate_section (bfd *output_bfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: The target (%s) of an %s relocation " (_("%B: The target (%s) of an %s relocation"
"is in the wrong section (%s)"), " is in the wrong section (%A)"),
bfd_get_filename (input_bfd), input_bfd,
sym_name, sym_name,
microblaze_elf_howto_table[(int) r_type]->name, microblaze_elf_howto_table[(int) r_type]->name,
bfd_get_section_name (sec->owner, sec)); sec);
/*bfd_set_error (bfd_error_bad_value); ??? why? */ /*bfd_set_error (bfd_error_bad_value); ??? why? */
ret = FALSE; ret = FALSE;
continue; continue;

View file

@ -4969,8 +4969,8 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
if (bfd_link_pic (info)) if (bfd_link_pic (info))
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared " (_("%B: warning: cannot deal R_NDS32_25_ABS_RELA in shared "
"mode."), bfd_get_filename (input_bfd)); "mode."), input_bfd);
return FALSE; return FALSE;
} }
break; break;
@ -15433,9 +15433,9 @@ nds32_elf_ex9_build_hash_table (bfd *abfd, asection *sec,
/* Incorrect alignment. */ /* Incorrect alignment. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: warning: unaligned small data access. " (_("%B: warning: unaligned small data access. "
"For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."), "For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."),
bfd_get_filename (abfd), irel->r_offset, abfd, irel->r_offset,
irel->r_info, irel->r_addend, relocation, align); irel->r_info, irel->r_addend, relocation, align);
off += 4; off += 4;
continue; continue;

View file

@ -1198,9 +1198,9 @@ rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("RL78 ABI conflict: G10 file %s cannot be linked with %s file %s"), (_("RL78 ABI conflict: G10 file %B cannot be linked"
bfd_get_filename (ibfd), " with %s file %B"),
rl78_cpu_name (out_cpu), bfd_get_filename (obfd)); ibfd, rl78_cpu_name (out_cpu), obfd);
} }
else else
{ {
@ -1215,9 +1215,9 @@ rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("RL78 ABI conflict: cannot link %s file %s with %s file %s"), (_("RL78 ABI conflict: cannot link %s file %B with %s file %B"),
rl78_cpu_name (in_cpu), bfd_get_filename (ibfd), rl78_cpu_name (in_cpu), ibfd,
rl78_cpu_name (out_cpu), bfd_get_filename (obfd)); rl78_cpu_name (out_cpu), obfd);
} }
} }
@ -1228,12 +1228,12 @@ rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
if (old_flags & E_FLAG_RL78_64BIT_DOUBLES) if (old_flags & E_FLAG_RL78_64BIT_DOUBLES)
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("- %s is 64-bit, %s is not"), _bfd_error_handler (_("- %B is 64-bit, %B is not"),
bfd_get_filename (obfd), bfd_get_filename (ibfd)); obfd, ibfd);
else else
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("- %s is 64-bit, %s is not"), _bfd_error_handler (_("- %B is 64-bit, %B is not"),
bfd_get_filename (ibfd), bfd_get_filename (obfd)); ibfd, obfd);
error = TRUE; error = TRUE;
} }
} }

View file

@ -3142,8 +3142,9 @@ rx_elf_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
} }
else else
{ {
_bfd_error_handler (_("There is a conflict merging the ELF header flags from %s"), _bfd_error_handler (_("There is a conflict merging the"
bfd_get_filename (ibfd)); " ELF header flags from %B"),
ibfd);
_bfd_error_handler (_(" the input file's flags: %s"), _bfd_error_handler (_(" the input file's flags: %s"),
describe_flags (new_flags)); describe_flags (new_flags));
_bfd_error_handler (_(" the output file's flags: %s"), _bfd_error_handler (_(" the output file's flags: %s"),

View file

@ -2769,7 +2769,6 @@ s3_bfd_score_elf_check_relocs (bfd *abfd,
asection *sec, asection *sec,
const Elf_Internal_Rela *relocs) const Elf_Internal_Rela *relocs)
{ {
const char *name;
bfd *dynobj; bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes; struct elf_link_hash_entry **sym_hashes;
@ -2789,8 +2788,6 @@ s3_bfd_score_elf_check_relocs (bfd *abfd,
sym_hashes = elf_sym_hashes (abfd); sym_hashes = elf_sym_hashes (abfd);
extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info; extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
name = bfd_get_section_name (abfd, sec);
if (dynobj == NULL) if (dynobj == NULL)
{ {
sgot = NULL; sgot = NULL;
@ -2829,7 +2826,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: Malformed reloc detected for section %s"), abfd, name); (_("%B: Malformed reloc detected for section %A"), abfd, sec);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View file

@ -2578,7 +2578,6 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
asection *sec, asection *sec,
const Elf_Internal_Rela *relocs) const Elf_Internal_Rela *relocs)
{ {
const char *name;
bfd *dynobj; bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes; struct elf_link_hash_entry **sym_hashes;
@ -2598,8 +2597,6 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
sym_hashes = elf_sym_hashes (abfd); sym_hashes = elf_sym_hashes (abfd);
extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info; extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
name = bfd_get_section_name (abfd, sec);
if (dynobj == NULL) if (dynobj == NULL)
{ {
sgot = NULL; sgot = NULL;
@ -2638,7 +2635,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: Malformed reloc detected for section %s"), abfd, name); (_("%B: Malformed reloc detected for section %A"), abfd, sec);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View file

@ -222,17 +222,16 @@ sh64_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
if (bfd_get_arch_size (ibfd) == 32 if (bfd_get_arch_size (ibfd) == 32
&& bfd_get_arch_size (obfd) == 64) && bfd_get_arch_size (obfd) == 64)
/* xgettext:c-format */ /* xgettext:c-format */
msg = _("%s: compiled as 32-bit object and %s is 64-bit"); msg = _("%B: compiled as 32-bit object and %B is 64-bit");
else if (bfd_get_arch_size (ibfd) == 64 else if (bfd_get_arch_size (ibfd) == 64
&& bfd_get_arch_size (obfd) == 32) && bfd_get_arch_size (obfd) == 32)
/* xgettext:c-format */ /* xgettext:c-format */
msg = _("%s: compiled as 64-bit object and %s is 32-bit"); msg = _("%B: compiled as 64-bit object and %B is 32-bit");
else else
/* xgettext:c-format */ /* xgettext:c-format */
msg = _("%s: object size does not match that of target %s"); msg = _("%B: object size does not match that of target %B");
_bfd_error_handler (msg, bfd_get_filename (ibfd), _bfd_error_handler (msg, ibfd, obfd);
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return FALSE;
} }
@ -249,8 +248,9 @@ sh64_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5) else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
{ {
_bfd_error_handler _bfd_error_handler
("%s: uses non-SH64 instructions while previous modules use SH64 instructions", ("%B: uses non-SH64 instructions while previous modules"
bfd_get_filename (ibfd)); " use SH64 instructions",
ibfd);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -452,8 +452,7 @@ sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
{ {
/* Make sure we don't get confused on invalid input. */ /* Make sure we don't get confused on invalid input. */
_bfd_error_handler _bfd_error_handler
(_("%s: encountered datalabel symbol in input"), (_("%B: encountered datalabel symbol in input"), abfd);
bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -548,8 +547,8 @@ shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
if ((insn & SHMEDIA_PTB_BIT) != 0) if ((insn & SHMEDIA_PTB_BIT) != 0)
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: GAS error: unexpected PTB insn with R_SH_PT_16"), (_("%B: GAS error: unexpected PTB insn with R_SH_PT_16"),
bfd_get_filename (input_section->owner)); input_section->owner);
return FALSE; return FALSE;
} }
@ -674,8 +673,7 @@ sh64_elf_final_write_processing (bfd *abfd,
{ {
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
_bfd_error_handler _bfd_error_handler
(_("%s: could not write out added .cranges entries"), (_("%B: could not write out added .cranges entries"), abfd);
bfd_get_filename (abfd));
} }
} }
@ -734,8 +732,7 @@ sh64_elf_final_write_processing (bfd *abfd,
{ {
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
_bfd_error_handler _bfd_error_handler
(_("%s: could not write out sorted .cranges entries"), (_("%B: could not write out sorted .cranges entries"), abfd);
bfd_get_filename (abfd));
} }
} }
} }

View file

@ -3600,9 +3600,9 @@ v850_elf_relax_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: 0x%lx: warning: R_V850_LONGCALL points to " (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
"unrecognized insns"), "unrecognized insns"),
bfd_get_filename (abfd), (unsigned long) irel->r_offset); abfd, (unsigned long) irel->r_offset);
continue; continue;
} }
@ -3610,9 +3610,9 @@ v850_elf_relax_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: 0x%lx: warning: R_V850_LONGCALL points to " (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
"unrecognized insn 0x%x"), "unrecognized insn 0x%x"),
bfd_get_filename (abfd), abfd,
(unsigned long) irel->r_offset + no_match, (unsigned long) irel->r_offset + no_match,
insn[no_match]); insn[no_match]);
continue; continue;
@ -3655,9 +3655,9 @@ v850_elf_relax_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: 0x%lx: warning: R_V850_LONGCALL points to " (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
"unrecognized reloc"), "unrecognized reloc"),
bfd_get_filename (abfd), (unsigned long) irel->r_offset); abfd, (unsigned long) irel->r_offset);
continue; continue;
} }
@ -3695,9 +3695,9 @@ v850_elf_relax_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: 0x%lx: warning: R_V850_LONGCALL points to " (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
"unrecognized reloc 0x%lx"), "unrecognized reloc 0x%lx"),
bfd_get_filename (abfd), (unsigned long) irel->r_offset, abfd, (unsigned long) irel->r_offset,
irelcall->r_offset); irelcall->r_offset);
continue; continue;
} }
@ -3838,9 +3838,9 @@ v850_elf_relax_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: 0x%lx: warning: R_V850_LONGJUMP points to " (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
"unrecognized insns"), "unrecognized insns"),
bfd_get_filename (abfd), (unsigned long) irel->r_offset); abfd, (unsigned long) irel->r_offset);
continue; continue;
} }
@ -3848,9 +3848,9 @@ v850_elf_relax_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: 0x%lx: warning: R_V850_LONGJUMP points to " (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
"unrecognized insn 0x%x"), "unrecognized insn 0x%x"),
bfd_get_filename (abfd), abfd,
(unsigned long) irel->r_offset + no_match, (unsigned long) irel->r_offset + no_match,
insn[no_match]); insn[no_match]);
continue; continue;
@ -3882,9 +3882,9 @@ v850_elf_relax_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: 0x%lx: warning: R_V850_LONGJUMP points to " (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
"unrecognized reloc"), "unrecognized reloc"),
bfd_get_filename (abfd), (unsigned long) irel->r_offset); abfd, (unsigned long) irel->r_offset);
continue; continue;
} }

View file

@ -632,10 +632,9 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (eh->got_addend != (bfd_vma) rel->r_addend) if (eh->got_addend != (bfd_vma) rel->r_addend)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: warning: GOT addend of %ld to `%s' does" (_("%B: warning: GOT addend of %ld to `%s' does"
" not match previous GOT addend of %ld"), " not match previous GOT addend of %ld"),
bfd_get_filename (abfd), rel->r_addend, abfd, rel->r_addend, h->root.root.string,
h->root.root.string,
eh->got_addend); eh->got_addend);
} }
@ -1509,10 +1508,9 @@ elf_vax_relocate_section (bfd *output_bfd,
else if (rel->r_addend != 0) else if (rel->r_addend != 0)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: warning: PLT addend of %d to `%s' from %s section ignored"), (_("%B: warning: PLT addend of %d to `%s'"
bfd_get_filename (input_bfd), rel->r_addend, " from %A section ignored"),
h->root.root.string, input_bfd, rel->r_addend, h->root.root.string, input_section);
bfd_get_section_name (input_bfd, input_section));
rel->r_addend = 0; rel->r_addend = 0;
break; break;
@ -1635,17 +1633,16 @@ elf_vax_relocate_section (bfd *output_bfd,
if (h != NULL) if (h != NULL)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: warning: %s relocation against symbol `%s' from %s section"), (_("%B: warning: %s relocation against symbol `%s'"
bfd_get_filename (input_bfd), howto->name, " from %A section"),
h->root.root.string, input_bfd, howto->name, h->root.root.string,
bfd_get_section_name (input_bfd, input_section)); input_section);
else else
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: warning: %s relocation to 0x%x from %s section"), (_("%B: warning: %s relocation to 0x%x from %A section"),
bfd_get_filename (input_bfd), howto->name, input_bfd, howto->name, outrel.r_addend,
outrel.r_addend, input_section);
bfd_get_section_name (input_bfd, input_section));
} }
loc = sreloc->contents; loc = sreloc->contents;
loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela); loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela);

View file

@ -814,10 +814,9 @@ visium_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
if (mismatch) if (mismatch)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: compiled %s -mtune=%s and linked with modules" (_("%B: compiled %s -mtune=%s and linked with modules"
" compiled %s -mtune=%s"), " compiled %s -mtune=%s"),
bfd_get_filename (ibfd), new_opt_with, opt_arch, old_opt_with, ibfd, new_opt_with, opt_arch, old_opt_with, opt_arch);
opt_arch);
} }
return TRUE; return TRUE;

View file

@ -3279,9 +3279,8 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
overflow: overflow:
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: short data segment overflowed (0x%lx >= 0x400000)"), (_("%B: short data segment overflowed (0x%lx >= 0x400000)"),
bfd_get_filename (abfd), abfd, (unsigned long) (max_short_vma - min_short_vma));
(unsigned long) (max_short_vma - min_short_vma));
return FALSE; return FALSE;
} }
else if ((gp_val > min_short_vma else if ((gp_val > min_short_vma
@ -3290,8 +3289,7 @@ overflow:
&& max_short_vma - gp_val >= 0x200000)) && max_short_vma - gp_val >= 0x200000))
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: __gp does not cover short data segment"), (_("%B: __gp does not cover short data segment"), abfd);
bfd_get_filename (abfd));
return FALSE; return FALSE;
} }
} }

View file

@ -1192,9 +1192,9 @@ mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: Internal inconsistency error for value for\n\ (_("%B: Internal inconsistency error for value for\n\
linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"), linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"),
bfd_get_filename (isec->owner), isec->owner,
(unsigned long) (value >> 32), (unsigned long) value, (unsigned long) (value >> 32), (unsigned long) value,
(unsigned long) (gregdata->reloc_request[bpo_index].value (unsigned long) (gregdata->reloc_request[bpo_index].value
>> 32), >> 32),
@ -1615,15 +1615,15 @@ mmix_final_link_relocate (reloc_howto_type *howto, asection *input_section,
if (symname == NULL || *symname == 0) if (symname == NULL || *symname == 0)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: base-plus-offset relocation against register symbol: (unknown) in %s"), (_("%B: base-plus-offset relocation against register symbol:"
bfd_get_filename (input_section->owner), " (unknown) in %A"),
bfd_get_section_name (symsec->owner, symsec)); input_section->owner, symsec);
else else
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: base-plus-offset relocation against register symbol: %s in %s"), (_("%B: base-plus-offset relocation against register symbol:"
bfd_get_filename (input_section->owner), symname, " %s in %A"),
bfd_get_section_name (symsec->owner, symsec)); input_section->owner, symname, symsec);
return bfd_reloc_overflow; return bfd_reloc_overflow;
} }
goto do_mmix_reloc; goto do_mmix_reloc;
@ -1666,15 +1666,15 @@ mmix_final_link_relocate (reloc_howto_type *howto, asection *input_section,
if (symname == NULL || *symname == 0) if (symname == NULL || *symname == 0)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: register relocation against non-register symbol: (unknown) in %s"), (_("%B: register relocation against non-register symbol:"
bfd_get_filename (input_section->owner), " (unknown) in %A"),
bfd_get_section_name (symsec->owner, symsec)); input_section->owner, symsec);
else else
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: register relocation against non-register symbol: %s in %s"), (_("%B: register relocation against non-register symbol:"
bfd_get_filename (input_section->owner), symname, " %s in %A"),
bfd_get_section_name (symsec->owner, symsec)); input_section->owner, symname, symsec);
/* The bfd_reloc_outofrange return value, though intuitively a /* The bfd_reloc_outofrange return value, though intuitively a
better value, will not get us an error. */ better value, will not get us an error. */
@ -1709,8 +1709,8 @@ mmix_final_link_relocate (reloc_howto_type *howto, asection *input_section,
MMIX_REG_SECTION_NAME) != 0) MMIX_REG_SECTION_NAME) != 0)
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: directive LOCAL valid only with a register or absolute value"), (_("%B: directive LOCAL valid only with a register or absolute value"),
bfd_get_filename (input_section->owner)); input_section->owner);
return bfd_reloc_overflow; return bfd_reloc_overflow;
} }
@ -1740,8 +1740,9 @@ mmix_final_link_relocate (reloc_howto_type *howto, asection *input_section,
/* FIXME: Better error message. */ /* FIXME: Better error message. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld."), (_("%B: LOCAL directive: Register $%ld is not a local register."
bfd_get_filename (input_section->owner), (long) srel, (long) first_global); " First global register is $%ld."),
input_section->owner, (long) srel, (long) first_global);
return bfd_reloc_overflow; return bfd_reloc_overflow;
} }
@ -2198,9 +2199,9 @@ mmix_elf_add_symbol_hook (bfd *abfd,
h->u.def.section->owner is NULL. */ h->u.def.section->owner is NULL. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: Error: multiple definition of `%s'; start of %s " (_("%B: Error: multiple definition of `%s'; start of %s "
"is set in a earlier linked file\n"), "is set in a earlier linked file\n"),
bfd_get_filename (abfd), *namep, abfd, *namep,
*namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)); *namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX));
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;

View file

@ -1677,8 +1677,9 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: error: unaligned relocation type %d at %08x reloc %08x\n"), (_("%B: error: unaligned relocation type %d at %08x reloc %08x\n"),
bfd_get_filename (input_bfd), (int)r_type, (unsigned)rel->r_offset, (unsigned)relocation); input_bfd, (int) r_type, (unsigned) rel->r_offset,
(unsigned) relocation);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -2273,17 +2274,16 @@ sh_elf64_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
if (bfd_get_arch_size (ibfd) == 32 if (bfd_get_arch_size (ibfd) == 32
&& bfd_get_arch_size (obfd) == 64) && bfd_get_arch_size (obfd) == 64)
/* xgettext:c-format */ /* xgettext:c-format */
msg = _("%s: compiled as 32-bit object and %s is 64-bit"); msg = _("%B: compiled as 32-bit object and %B is 64-bit");
else if (bfd_get_arch_size (ibfd) == 64 else if (bfd_get_arch_size (ibfd) == 64
&& bfd_get_arch_size (obfd) == 32) && bfd_get_arch_size (obfd) == 32)
/* xgettext:c-format */ /* xgettext:c-format */
msg = _("%s: compiled as 64-bit object and %s is 32-bit"); msg = _("%B: compiled as 64-bit object and %B is 32-bit");
else else
/* xgettext:c-format */ /* xgettext:c-format */
msg = _("%s: object size does not match that of target %s"); msg = _("%B: object size does not match that of target %B");
_bfd_error_handler (msg, bfd_get_filename (ibfd), _bfd_error_handler (msg, ibfd, obfd);
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return FALSE;
} }
@ -2302,8 +2302,7 @@ sh_elf64_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5) else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
{ {
_bfd_error_handler _bfd_error_handler
("%s: does not use the SH64 64-bit ABI as previous modules do", ("%B: does not use the SH64 64-bit ABI as previous modules do", ibfd);
bfd_get_filename (ibfd));
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -2774,8 +2773,7 @@ sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
{ {
/* Make sure we don't get confused on invalid input. */ /* Make sure we don't get confused on invalid input. */
_bfd_error_handler _bfd_error_handler
(_("%s: encountered datalabel symbol in input"), (_("%B: encountered datalabel symbol in input"), abfd);
bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View file

@ -756,8 +756,9 @@ elf_object_p (bfd *abfd)
So we are kind, and reset the string index value to 0 So we are kind, and reset the string index value to 0
so that at least some processing can be done. */ so that at least some processing can be done. */
i_ehdrp->e_shstrndx = SHN_UNDEF; i_ehdrp->e_shstrndx = SHN_UNDEF;
_bfd_error_handler (_("warning: %s has a corrupt string table index - ignoring"), _bfd_error_handler
abfd->filename); (_("warning: %B has a corrupt string table index - ignoring"),
abfd);
} }
} }
else if (i_ehdrp->e_shstrndx != SHN_UNDEF) else if (i_ehdrp->e_shstrndx != SHN_UNDEF)
@ -1189,8 +1190,8 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: version count (%ld) does not match symbol count (%ld)"), (_("%B: version count (%ld) does not match symbol count (%ld)"),
abfd->filename, abfd,
(long) (verhdr->sh_size / sizeof (Elf_External_Versym)), (long) (verhdr->sh_size / sizeof (Elf_External_Versym)),
symcount); symcount);
@ -1444,8 +1445,8 @@ elf_slurp_reloc_table_from_section (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s(%s): relocation %d has invalid symbol index %ld"), (_("%B(%A): relocation %d has invalid symbol index %ld"),
abfd->filename, asect->name, i, ELF_R_SYM (rela.r_info)); abfd, asect, i, ELF_R_SYM (rela.r_info));
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
} }
else else

View file

@ -2849,7 +2849,7 @@ _bfd_aarch64_add_stub_entry_in_group (const char *stub_name,
if (stub_entry == NULL) if (stub_entry == NULL)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%s: cannot create stub entry %s"), _bfd_error_handler (_("%B: cannot create stub entry %s"),
section->owner, stub_name); section->owner, stub_name);
return NULL; return NULL;
} }

View file

@ -3685,9 +3685,8 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
overflow: overflow:
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: short data segment overflowed (0x%lx >= 0x400000)"), (_("%B: short data segment overflowed (0x%lx >= 0x400000)"),
bfd_get_filename (abfd), abfd, (unsigned long) (max_short_vma - min_short_vma));
(unsigned long) (max_short_vma - min_short_vma));
return FALSE; return FALSE;
} }
else if ((gp_val > min_short_vma else if ((gp_val > min_short_vma
@ -3696,8 +3695,7 @@ overflow:
&& max_short_vma - gp_val >= 0x200000)) && max_short_vma - gp_val >= 0x200000))
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: __gp does not cover short data segment"), (_("%B: __gp does not cover short data segment"), abfd);
bfd_get_filename (abfd));
return FALSE; return FALSE;
} }
} }

View file

@ -14685,8 +14685,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: illegal section name `%s'"), (_("%B: illegal section name `%A'"), abfd, o);
bfd_get_filename (abfd), o->name);
bfd_set_error (bfd_error_nonrepresentable_section); bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE; return FALSE;
} }

View file

@ -337,8 +337,10 @@ hpux_core_core_file_p (bfd *abfd)
*/ */
if ((unknown_sections > 0) && (good_sections > 0)) if ((unknown_sections > 0) && (good_sections > 0))
_bfd_error_handler _bfd_error_handler
("%s appears to be a core file,\nbut contains unknown sections. It may have been created on an incompatible\nversion of HP-UX. As a result, some information may be unavailable.\n", ("%B appears to be a core file,\nbut contains unknown sections."
abfd->filename); " It may have been created on an incompatible\nversion of HP-UX."
" As a result, some information may be unavailable.\n",
abfd);
return abfd->xvec; return abfd->xvec;

View file

@ -156,8 +156,7 @@ ieee_write_id (bfd *abfd, const char *id)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: string too long (%d chars, max 65535)"), (_("%B: string too long (%d chars, max 65535)"), abfd, length);
bfd_get_filename (abfd), length);
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return FALSE;
} }
@ -291,9 +290,8 @@ ieee_write_expression (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: unrecognized symbol `%s' flags 0x%x"), (_("%B: unrecognized symbol `%s' flags 0x%x"),
bfd_get_filename (abfd), bfd_asymbol_name (symbol), abfd, bfd_asymbol_name (symbol), symbol->flags);
symbol->flags);
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return FALSE;
} }

View file

@ -830,8 +830,8 @@ ihex_write_object_contents (bfd *abfd)
sprintf_vma (buf, where); sprintf_vma (buf, where);
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: address 0x%s out of range for Intel Hex file"), (_("%B: address 0x%s out of range for Intel Hex file"),
bfd_get_filename (abfd), buf); abfd, buf);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View file

@ -1405,8 +1405,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
if (!bfd_link_relocatable (info) if (!bfd_link_relocatable (info)
&& strcmp (name, "__gnu_lto_slim") == 0) && strcmp (name, "__gnu_lto_slim") == 0)
_bfd_error_handler _bfd_error_handler
(_("%s: plugin needed to handle lto object"), (_("%B: plugin needed to handle lto object"), abfd);
bfd_get_filename (abfd));
} }
else else
row = DEF_ROW; row = DEF_ROW;

View file

@ -861,8 +861,8 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
if (offset > sec->rawsize) if (offset > sec->rawsize)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: access beyond end of merged section (%ld)"), (_("%B: access beyond end of merged section (%ld)"),
bfd_get_filename (sec->owner), (long) offset); sec->owner, (long) offset);
return secinfo->first_str ? sec->size : 0; return secinfo->first_str ? sec->size : 0;
} }

116
bfd/mmo.c
View file

@ -465,8 +465,8 @@ mmo_make_section (bfd *abfd, const char *secname)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: No core to allocate section name %s\n"), (_("%B: No core to allocate section name %s\n"),
bfd_get_filename (abfd), secname); abfd, secname);
bfd_set_error (bfd_error_system_call); bfd_set_error (bfd_error_system_call);
return NULL; return NULL;
} }
@ -541,8 +541,8 @@ mmo_object_p (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: No core to allocate a symbol %d bytes long\n"), (_("%B: No core to allocate a symbol %d bytes long\n"),
bfd_get_filename (abfd), abfd->tdata.mmo_data->max_symbol_length); abfd, abfd->tdata.mmo_data->max_symbol_length);
goto bad_final; goto bad_final;
} }
@ -955,8 +955,9 @@ mmo_write_loc_chunk (bfd *abfd, bfd_vma vma, const bfd_byte *loc,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: attempt to emit contents at non-multiple-of-4 address 0x%lx\n"), (_("%B: attempt to emit contents at non-multiple-of-4"
bfd_get_filename (abfd), (unsigned long) vma); " address 0x%lx\n"),
abfd, (unsigned long) vma);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -1251,8 +1252,9 @@ mmo_create_symbol (bfd *abfd, const char *symname, bfd_vma addr, enum
&& !mmo_ignore_symbol_consistency (abfd)) && !mmo_ignore_symbol_consistency (abfd))
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: invalid mmo file: initialization value for $255 is not `Main'\n"), (_("%B: invalid mmo file: initialization value for $255"
bfd_get_filename (abfd)); " is not `Main'\n"),
abfd);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -1397,10 +1399,9 @@ SUBSECTION
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: unsupported wide character sequence" (_("%B: unsupported wide character sequence"
" 0x%02X 0x%02X after symbol name starting with `%s'\n"), " 0x%02X 0x%02X after symbol name starting with `%s'\n"),
bfd_get_filename (abfd), c, c2, abfd, c, c2, abfd->tdata.mmo_data->lop_stab_symbol);
abfd->tdata.mmo_data->lop_stab_symbol);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
abfd->tdata.mmo_data->have_error = TRUE; abfd->tdata.mmo_data->have_error = TRUE;
return FALSE; return FALSE;
@ -1632,8 +1633,8 @@ mmo_scan (bfd *abfd)
default: default:
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: unsupported lopcode `%d'\n"), (_("%B: invalid mmo file: unsupported lopcode `%d'\n"),
bfd_get_filename (abfd), buf[1]); abfd, buf[1]);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
@ -1643,8 +1644,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"), (_("%B: invalid mmo file: expected YZ = 1"
bfd_get_filename (abfd), y*256+z); " got YZ = %d for lop_quote\n"),
abfd, y*256+z);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1680,8 +1682,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"), (_("%B: invalid mmo file: expected z = 1 or z = 2,"
bfd_get_filename (abfd), z); " got z = %d for lop_loc\n"),
abfd, z);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1730,8 +1733,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"), (_("%B: invalid mmo file: expected z = 1 or z = 2,"
bfd_get_filename (abfd), z); " got z = %d for lop_fixo\n"),
abfd, z);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1770,8 +1774,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"), (_("%B: invalid mmo file: expected y = 0,"
bfd_get_filename (abfd), y); " got y = %d for lop_fixrx\n"),
abfd, y);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1780,8 +1785,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"), (_("%B: invalid mmo file: expected z = 16 or z = 24,"
bfd_get_filename (abfd), z); " got z = %d for lop_fixrx\n"),
abfd, z);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1804,8 +1810,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"), (_("%B: invalid mmo file: leading byte of operand word"
bfd_get_filename (abfd), buf[0]); " must be 0 or 1, got %d for lop_fixrx\n"),
abfd, buf[0]);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1828,8 +1835,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: cannot allocate file name for file number %d, %d bytes\n"), (_("%B: cannot allocate file name for file number %d,"
bfd_get_filename (abfd), y, z * 4 + 1); " %d bytes\n"),
abfd, y, z * 4 + 1);
bfd_set_error (bfd_error_system_call); bfd_set_error (bfd_error_system_call);
goto error_return; goto error_return;
} }
@ -1849,9 +1857,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: file number %d `%s'," (_("%B: invalid mmo file: file number %d `%s',"
" was already entered as `%s'\n"), " was already entered as `%s'\n"),
bfd_get_filename (abfd), y, fname, file_names[y]); abfd, y, fname, file_names[y]);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1863,9 +1871,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: file name for number %d" (_("%B: invalid mmo file: file name for number %d"
" was not specified before use\n"), " was not specified before use\n"),
bfd_get_filename (abfd), y); abfd, y);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -1970,9 +1978,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: fields y and z of lop_stab" (_("%B: invalid mmo file: fields y and z of lop_stab"
" non-zero, y: %d, z: %d\n"), " non-zero, y: %d, z: %d\n"),
bfd_get_filename (abfd), y, z); abfd, y, z);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -2007,9 +2015,9 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: lop_end not last item in" (_("%B: invalid mmo file: lop_end not last item in"
" file\n"), " file\n"),
bfd_get_filename (abfd)); abfd);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }
@ -2021,10 +2029,10 @@ mmo_scan (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid mmo file: YZ of lop_end (%ld)" (_("%B: invalid mmo file: YZ of lop_end (%ld)"
" not equal to the number of tetras to the preceding" " not equal to the number of tetras to the preceding"
" lop_stab (%ld)\n"), " lop_stab (%ld)\n"),
bfd_get_filename (abfd), (long) (y * 256 + z), abfd, (long) (y * 256 + z),
(curpos - stab_loc - 4)/4); (curpos - stab_loc - 4)/4);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
@ -2732,8 +2740,8 @@ mmo_internal_add_3_sym (bfd *abfd, struct mmo_symbol_trie *rootp,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid symbol table: duplicate symbol `%s'\n"), (_("%B: invalid symbol table: duplicate symbol `%s'\n"),
bfd_get_filename (abfd), trie->sym.name); abfd, trie->sym.name);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -2975,9 +2983,9 @@ mmo_write_symbols_and_terminator (bfd *abfd)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: Bad symbol definition: `Main' set to %s rather" (_("%B: Bad symbol definition: `Main' set to %s rather"
" than the start address %s\n"), " than the start address %s\n"),
bfd_get_filename (abfd), vmas_main, vmas_start); abfd, vmas_main, vmas_start);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -3074,9 +3082,9 @@ mmo_write_symbols_and_terminator (bfd *abfd)
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: warning: symbol table too large for mmo, larger than 65535" (_("%B: warning: symbol table too large for mmo, larger than 65535"
" 32-bit words: %d. Only `Main' will be emitted.\n"), " 32-bit words: %d. Only `Main' will be emitted.\n"),
bfd_get_filename (abfd), trie_len); abfd, trie_len);
memset (&sym, 0, sizeof (sym)); memset (&sym, 0, sizeof (sym));
sym.sym_type = mmo_abs_sym; sym.sym_type = mmo_abs_sym;
@ -3120,9 +3128,9 @@ mmo_write_symbols_and_terminator (bfd *abfd)
diagnostic and fail "normally". */ diagnostic and fail "normally". */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: internal error, symbol table changed size from %d to %d" (_("%B: internal error, symbol table changed size from %d to %d"
" words\n"), " words\n"),
bfd_get_filename (abfd), trie_len, abfd, trie_len,
(abfd->tdata.mmo_data->byte_no + 3)/4); (abfd->tdata.mmo_data->byte_no + 3)/4);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
@ -3173,9 +3181,9 @@ mmo_write_section_unless_reg_contents (bfd *abfd, asection *sec, void *p)
this. */ this. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: internal error, internal register section %s had" (_("%B: internal error, internal register section %A had"
" contents\n"), " contents\n"),
bfd_get_filename (abfd), sec->name); abfd, sec);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
infop->retval = FALSE; infop->retval = FALSE;
return; return;
@ -3224,23 +3232,21 @@ mmo_write_object_contents (bfd *abfd)
if (sec->size == 0) if (sec->size == 0)
/* There must always be at least one such register. */ /* There must always be at least one such register. */
_bfd_error_handler _bfd_error_handler
(_("%s: no initialized registers; section length 0\n"), (_("%B: no initialized registers; section length 0\n"),
bfd_get_filename (abfd)); abfd);
else if (sec->vma > (256 - 32) * 8) else if (sec->vma > (256 - 32) * 8)
/* Provide better error message for the case of too many /* Provide better error message for the case of too many
global registers. */ global registers. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: too many initialized registers; section length %ld\n"), (_("%B: too many initialized registers; section length %ld\n"),
bfd_get_filename (abfd), abfd, (long) sec->size);
(long) sec->size);
else else
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: invalid start address for initialized registers of" (_("%B: invalid start address for initialized registers of"
" length %ld: 0x%lx%08lx\n"), " length %ld: 0x%lx%08lx\n"),
bfd_get_filename (abfd), abfd, (long) sec->size,
(long) sec->size,
(unsigned long) (sec->vma >> 32), (unsigned long) (sec->vma)); (unsigned long) (sec->vma >> 32), (unsigned long) (sec->vma));
return FALSE; return FALSE;

View file

@ -878,8 +878,7 @@ oasys_write_sections (bfd *abfd)
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: can not represent section `%s' in oasys"), (_("%B: can not represent section `%A' in oasys"), abfd, s);
bfd_get_filename (abfd), s->name);
bfd_set_error (bfd_error_nonrepresentable_section); bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE; return FALSE;
} }

View file

@ -1149,8 +1149,8 @@ NAME (aout, set_section_contents) (bfd *abfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: can not represent section `%s' in a.out object file format"), (_("%B: can not represent section `%A' in a.out object file format"),
bfd_get_filename (abfd), bfd_get_section_name (abfd, section)); abfd, section);
bfd_set_error (bfd_error_nonrepresentable_section); bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE; return FALSE;
} }
@ -3705,9 +3705,8 @@ NAME (aout, final_link) (bfd *abfd,
by the reloc size. */ by the reloc size. */
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%s: relocatable link from %s to %s not supported"), (_("%B: relocatable link from %s to %s not supported"),
bfd_get_filename (abfd), abfd, sub->xvec->name, abfd->xvec->name);
sub->xvec->name, abfd->xvec->name);
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
goto error_return; goto error_return;
} }

View file

@ -1086,9 +1086,8 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out)
else else
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%s: line number overflow: 0x%lx > 0xffff"), _bfd_error_handler (_("%B: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd), abfd, scnhdr_int->s_nlnno);
scnhdr_int->s_nlnno);
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nlnno); H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nlnno);
ret = 0; ret = 0;
@ -4220,16 +4219,16 @@ rsrc_process_section (bfd * abfd,
if (data > dataend) if (data > dataend)
{ {
/* Corrupted .rsrc section - cannot merge. */ /* Corrupted .rsrc section - cannot merge. */
_bfd_error_handler (_("%s: .rsrc merge failure: corrupt .rsrc section"), _bfd_error_handler (_("%B: .rsrc merge failure: corrupt .rsrc section"),
bfd_get_filename (abfd)); abfd);
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
goto end; goto end;
} }
if ((data - p) > rsrc_sizes [num_resource_sets]) if ((data - p) > rsrc_sizes [num_resource_sets])
{ {
_bfd_error_handler (_("%s: .rsrc merge failure: unexpected .rsrc size"), _bfd_error_handler (_("%B: .rsrc merge failure: unexpected .rsrc size"),
bfd_get_filename (abfd)); abfd);
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
goto end; goto end;
} }

View file

@ -468,8 +468,7 @@ rs6000coff_core_p (bfd *abfd)
/* Issue warning if the core file was truncated during writing. */ /* Issue warning if the core file was truncated during writing. */
if (c_flag & CORE_TRUNC) if (c_flag & CORE_TRUNC)
_bfd_error_handler (_("%s: warning core file truncated"), _bfd_error_handler (_("%B: warning core file truncated"), abfd);
bfd_get_filename (abfd));
/* Allocate core file header. */ /* Allocate core file header. */
#ifndef BFD64 #ifndef BFD64

View file

@ -3672,7 +3672,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
if (section->reloc_count == 0) if (section->reloc_count == 0)
_bfd_error_handler _bfd_error_handler
(_("SEC_RELOC with no relocs in section %s"), section->name); (_("SEC_RELOC with no relocs in section %A"), section);
#if VMS_DEBUG #if VMS_DEBUG
else else
@ -3724,8 +3724,8 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
/* Regular relocs are intertwined with binary data. */ /* Regular relocs are intertwined with binary data. */
if (curr_addr > addr) if (curr_addr > addr)
_bfd_error_handler (_("Size error in section %s"), _bfd_error_handler (_("Size error in section %A"),
section->name); section);
size = addr - curr_addr; size = addr - curr_addr;
sto_imm (abfd, section, size, curr_data, curr_addr); sto_imm (abfd, section, size, curr_data, curr_addr);
curr_data += size; curr_data += size;
@ -3937,8 +3937,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
{ {
/* Output rest of section. */ /* Output rest of section. */
if (curr_addr > section->size) if (curr_addr > section->size)
_bfd_error_handler (_("Size error in section %s"), _bfd_error_handler (_("Size error in section %A"), section);
section->name);
size = section->size - curr_addr; size = section->size - curr_addr;
sto_imm (abfd, section, size, curr_data, curr_addr); sto_imm (abfd, section, size, curr_data, curr_addr);
curr_data += size; curr_data += size;

View file

@ -829,8 +829,8 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info)
if (info->output_bfd->xvec != abfd->xvec) if (info->output_bfd->xvec != abfd->xvec)
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: XCOFF shared object when not producing XCOFF output"), (_("%B: XCOFF shared object when not producing XCOFF output"),
bfd_get_filename (abfd)); abfd);
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return FALSE;
} }
@ -850,8 +850,8 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info)
if (lsec == NULL) if (lsec == NULL)
{ {
_bfd_error_handler _bfd_error_handler
(_("%s: dynamic object with no .loader section"), (_("%B: dynamic object with no .loader section"),
bfd_get_filename (abfd)); abfd);
bfd_set_error (bfd_error_no_symbols); bfd_set_error (bfd_error_no_symbols);
return FALSE; return FALSE;
} }