* 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>
+
+ * 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>
* bfd.c (PRINT_TYPE): Define.
if (r_type > 2)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%s: Invalid relocation type exported: %d"),
- bfd_get_filename (abfd), r_type);
+ _bfd_error_handler (_("%B: Invalid relocation type exported: %d"),
+ abfd, r_type);
bfd_set_error (bfd_error_wrong_format);
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: can not represent section `%s' in a.out object file format"),
- bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
+ (_("%B: can not represent section `%A' in a.out object file format"),
+ abfd, section);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
file. */
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd),
+ abfd,
cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*"));
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: can not represent section `%s' in a.out object file format"),
- bfd_get_filename (abfd), bfd_get_section_name (abfd, sec));
+ (_("%B: can not represent section `%A' in a.out object file format"),
+ abfd, sec);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
by the reloc size. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: relocatable link from %s to %s not supported"),
- bfd_get_filename (abfd),
- sub->xvec->name, abfd->xvec->name);
+ (_("%B: relocatable link from %s to %s not supported"),
+ abfd, sub->xvec->name, abfd->xvec->name);
bfd_set_error (bfd_error_invalid_operation);
goto error_return;
}
if (strcmp (syms[src_count]->name, "__gnu_lto_slim") == 0)
_bfd_error_handler
- (_("%s: plugin needed to handle lto object"),
- bfd_get_filename (current));
+ (_("%B: plugin needed to handle lto object"),
+ current);
namelen = strlen (syms[src_count]->name);
amt = sizeof (char *);
map[orl_count].name = (char **) bfd_alloc (arch, amt);
if (s->filepos < 0)
_bfd_error_handler
/* xgettext:c-format */
- (_("Warning: Writing section `%s' at huge (ie negative) "
+ (_("warning: writing section `%A' at huge (ie negative) "
"file offset 0x%lx."),
- bfd_get_section_name (abfd, s),
- (unsigned long) s->filepos);
+ s, (unsigned long) s->filepos);
}
abfd->output_has_begun = TRUE;
{
_bfd_error_handler
/* xgettext: c-format */
- (_("%s: unsupported relocation type 0x%02x"),
- bfd_get_filename (input_bfd), (unsigned int) rel->r_type);
+ (_("%B: unsupported relocation type 0x%02x"),
+ input_bfd, (unsigned int) rel->r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext: c-format */
- (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
- bfd_get_filename (input_bfd), rel->r_vaddr,
- h->root.root.string);
+ (_("%B: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
+ input_bfd, rel->r_vaddr, h->root.root.string);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext: c-format */
- (_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_get_filename (abfd), reloc->r_symndx);
+ (_("%B: warning: illegal symbol index %ld in relocs"),
+ abfd, reloc->r_symndx);
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
}
else if (hdr->s_nreloc == 0xffff)
_bfd_error_handler
- (_("%s: warning: claims to have 0xffff relocs, without overflow"),
- bfd_get_filename (abfd));
+ (_("%B: warning: claims to have 0xffff relocs, without overflow"),
+ abfd);
}
#undef ALIGN_SET
#undef ELIFALIGN_SET
bfd_set_error (bfd_error_file_too_big);
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: section %s: string table overflow at offset %ld"),
- abfd, current->name, string_size);
+ (_("%B: section %A: string table overflow at offset %ld"),
+ abfd, current, string_size);
return FALSE;
}
if (info->print_gc_sections && o->size != 0)
/* 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
/* But we also have to update some of the relocation
|| bfd_link_relocatable (flaginfo->info)))
_bfd_error_handler
/* xgettext: c-format */
- (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
- bfd_get_filename (output_bfd),
- bfd_get_section_name (output_bfd, sec),
- sec->reloc_count);
+ (_("%B: %A: reloc overflow: 0x%lx > 0xffff"),
+ output_bfd, sec, sec->reloc_count);
if (sec->lineno_count > 0xffff
&& (! obj_pe (output_bfd)
|| bfd_link_relocatable (flaginfo->info)))
_bfd_error_handler
/* xgettext: c-format */
- (_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
- bfd_get_filename (output_bfd),
- bfd_get_section_name (output_bfd, sec),
- sec->lineno_count);
+ (_("%B: warning: %A: line number overflow: 0x%lx > 0xffff"),
+ output_bfd, sec, sec->lineno_count);
auxp->x_scn.x_nreloc = sec->reloc_count;
auxp->x_scn.x_nlinno = sec->lineno_count;
buf[sizeof (scnhdr_int->s_name)] = '\0';
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
- bfd_get_filename (abfd),
- buf, scnhdr_int->s_nlnno);
+ (_("%B: warning: %s: line number overflow: 0x%lx > 0xffff"),
+ abfd, buf, scnhdr_int->s_nlnno);
PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
}
memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
buf[sizeof (scnhdr_int->s_name)] = '\0';
/* xgettext:c-format */
- _bfd_error_handler (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
- bfd_get_filename (abfd),
- buf, scnhdr_int->s_nreloc);
+ _bfd_error_handler (_("%B: %s: reloc overflow: 0x%lx > 0xffff"),
+ abfd, buf, scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated);
PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
ret = 0;
{
_bfd_error_handler
/* xgettext: c-format */
- (_("warning: unable to update contents of %s section in %s"),
- note_section, bfd_get_filename (abfd));
+ (_("warning: unable to update contents of %s section in %B"),
+ note_section, abfd);
goto FAIL;
}
}
if (addr <= last_addr)
{
/* 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;
}
if (addr & 1)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: %s invalid input section size"),
- sec->owner, sec->name);
+ _bfd_error_handler (_("%B: %A invalid input section size"),
+ sec->owner, sec);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
if (last_addr >= addr + sec->rawsize)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: %s points past end of text section"),
- sec->owner, sec->name);
+ _bfd_error_handler (_("%B: %A points past end of text section"),
+ sec->owner, sec);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
if (sec->output_section != osec)
{
_bfd_error_handler
- (_("Invalid output section for .eh_frame_entry: %s"),
- sec->output_section->name);
+ (_("Invalid output section for .eh_frame_entry: %A"),
+ sec->output_section);
return FALSE;
}
sec->output_offset = offset;
if (i != 0)
{
_bfd_error_handler
- (_("Invalid contents in %s section"), osec->name);
+ (_("Invalid contents in %A section"), osec);
return FALSE;
}
default:
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: Unsupported transition from %s to %s"),
- bfd_get_filename (input_bfd),
+ (_("%B: Unsupported transition from %s to %s"),
+ input_bfd,
elf_mn10300_howto_table[r_type].name,
elf_mn10300_howto_table[tls_r_type].name);
break;
/* There are some unknown sections in the group. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unknown [%d] section `%s' in group [%s]"),
+ (_("%B: unknown [%d] section `%s' in group [%A]"),
abfd,
(unsigned int) idx->shdr->sh_type,
bfd_elf_string_from_elf_section (abfd,
(elf_elfheader (abfd)
->e_shstrndx),
idx->shdr->sh_name),
- shdr->bfd_section->name);
+ shdr->bfd_section);
result = FALSE;
}
}
{
/* xgettext:c-format */
_bfd_error_handler (_("ERROR: Attempting to link %B "
- "with a binary %s of different architecture"),
- ibfd, bfd_get_filename (obfd));
+ "with a binary %B of different architecture"),
+ ibfd, obfd);
return FALSE;
}
else if (in_flags != out_flags)
/* Warn if different flags. */
_bfd_error_handler
/* 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)"),
- bfd_get_filename (ibfd), (long)in_flags, (long)out_flags);
+ ibfd, (long) in_flags, (long) out_flags);
if (in_flags && out_flags)
return FALSE;
/* MWDT doesnt set the eflags hence make sure we choose the
{
if (section == NULL)
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);
return NULL;
}
TRUE, FALSE);
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);
return FALSE;
}
if (!bfd_elf32_arm_process_before_allocation (ibfd, info)
|| !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info)
|| !bfd_elf32_arm_stm32l4xx_erratum_scan (ibfd, info))
- _bfd_error_handler (_("Errors encountered processing file %s"),
- ibfd->filename);
+ _bfd_error_handler (_("Errors encountered processing file %B"), ibfd);
}
/* Allocate space for the glue sections now that we've sized them. */
if (0)
#endif
_bfd_error_handler
- ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
- old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
- bfd_get_filename (ibfd));
+ ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %B",
+ old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no", ibfd);
if (!elf_flags_init (obfd)) /* First call, no flags set. */
{
error = TRUE;
if (IS_FDPIC (obfd))
_bfd_error_handler
- (_("%s: cannot link non-fdpic object file into fdpic executable"),
- bfd_get_filename (ibfd));
+ (_("%B: cannot link non-fdpic object file into fdpic executable"),
+ ibfd);
else
_bfd_error_handler
- (_("%s: cannot link fdpic object file into non-fdpic executable"),
- bfd_get_filename (ibfd));
+ (_("%B: cannot link fdpic object file into non-fdpic executable"),
+ ibfd);
}
if (error)
error = TRUE;
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: compiled with %s and linked with modules that use non-pic relocations"),
- bfd_get_filename (ibfd),
- (new_flags & EF_FRV_BIGPIC) ? "-fPIC" : "-fpic");
+ (_("%B: compiled with %s and linked with modules"
+ " that use non-pic relocations"),
+ ibfd, (new_flags & EF_FRV_BIGPIC) ? "-fPIC" : "-fpic");
#endif
}
}
error = TRUE;
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: compiled with %s and linked with modules compiled with %s"),
- bfd_get_filename (ibfd), new_opt, old_opt);
+ (_("%B: compiled with %s and linked with modules compiled with %s"),
+ ibfd, new_opt, old_opt);
}
/* Warn about any other mismatches */
error = TRUE;
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long)new_partial, (long)old_partial);
+ (_("%B: uses different unknown e_flags (0x%lx) fields"
+ " than previous modules (0x%lx)"),
+ ibfd, (long) new_partial, (long) old_partial);
}
}
error = TRUE;
if (IS_FDPIC (obfd))
_bfd_error_handler
- (_("%s: cannot link non-fdpic object file into fdpic executable"),
- bfd_get_filename (ibfd));
+ (_("%B: cannot link non-fdpic object file into fdpic executable"),
+ ibfd);
else
_bfd_error_handler
- (_("%s: cannot link fdpic object file into non-fdpic executable"),
- bfd_get_filename (ibfd));
+ (_("%B: cannot link fdpic object file into non-fdpic executable"),
+ ibfd);
}
if (error)
error = TRUE;
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: compiled with %s and linked with modules compiled with %s"),
- bfd_get_filename (ibfd), new_opt, old_opt);
+ (_("%B: compiled with %s and linked with modules compiled with %s"),
+ ibfd, new_opt, old_opt);
}
new_flags &= ~ EF_IQ2000_ALL_FLAGS;
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+ (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ ibfd, (long)new_flags, (long)old_flags);
}
}
error = TRUE;
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: compiled with %s and linked with modules compiled with %s"),
- bfd_get_filename (ibfd), new_opt, old_opt);
+ (_("%B: compiled with %s and linked with modules compiled with %s"),
+ ibfd, new_opt, old_opt);
}
new_flags &= ~ EF_M32C_ALL_FLAGS;
error = TRUE;
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+ (_("%B: uses different e_flags (0x%lx) fields"
+ " than previous modules (0x%lx)"),
+ ibfd, (long) new_flags, (long) old_flags);
}
}
if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unknown relocation type %d"),
- bfd_get_filename (input_bfd), (int) r_type);
+ _bfd_error_handler (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
continue;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: The target (%s) of an %s relocation "
- "is in the wrong section (%s)"),
- bfd_get_filename (input_bfd),
+ (_("%B: The target (%s) of an %s relocation"
+ " is in the wrong section (%A)"),
+ input_bfd,
sym_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? */
ret = FALSE;
continue;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: The target (%s) of an %s relocation "
- "is in the wrong section (%s)"),
- bfd_get_filename (input_bfd),
+ (_("%B: The target (%s) of an %s relocation"
+ " is in the wrong section (%A)"),
+ input_bfd,
sym_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? */
ret = FALSE;
continue;
if (bfd_link_pic (info))
{
_bfd_error_handler
- (_("%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared "
- "mode."), bfd_get_filename (input_bfd));
+ (_("%B: warning: cannot deal R_NDS32_25_ABS_RELA in shared "
+ "mode."), input_bfd);
return FALSE;
}
break;
/* Incorrect alignment. */
_bfd_error_handler
/* 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."),
- bfd_get_filename (abfd), irel->r_offset,
+ abfd, irel->r_offset,
irel->r_info, irel->r_addend, relocation, align);
off += 4;
continue;
_bfd_error_handler
/* xgettext:c-format */
- (_("RL78 ABI conflict: G10 file %s cannot be linked with %s file %s"),
- bfd_get_filename (ibfd),
- rl78_cpu_name (out_cpu), bfd_get_filename (obfd));
+ (_("RL78 ABI conflict: G10 file %B cannot be linked"
+ " with %s file %B"),
+ ibfd, rl78_cpu_name (out_cpu), obfd);
}
else
{
_bfd_error_handler
/* xgettext:c-format */
- (_("RL78 ABI conflict: cannot link %s file %s with %s file %s"),
- rl78_cpu_name (in_cpu), bfd_get_filename (ibfd),
- rl78_cpu_name (out_cpu), bfd_get_filename (obfd));
+ (_("RL78 ABI conflict: cannot link %s file %B with %s file %B"),
+ rl78_cpu_name (in_cpu), ibfd,
+ rl78_cpu_name (out_cpu), obfd);
}
}
if (old_flags & E_FLAG_RL78_64BIT_DOUBLES)
/* xgettext:c-format */
- _bfd_error_handler (_("- %s is 64-bit, %s is not"),
- bfd_get_filename (obfd), bfd_get_filename (ibfd));
+ _bfd_error_handler (_("- %B is 64-bit, %B is not"),
+ obfd, ibfd);
else
/* xgettext:c-format */
- _bfd_error_handler (_("- %s is 64-bit, %s is not"),
- bfd_get_filename (ibfd), bfd_get_filename (obfd));
+ _bfd_error_handler (_("- %B is 64-bit, %B is not"),
+ ibfd, obfd);
error = TRUE;
}
}
}
else
{
- _bfd_error_handler (_("There is a conflict merging the ELF header flags from %s"),
- bfd_get_filename (ibfd));
+ _bfd_error_handler (_("There is a conflict merging the"
+ " ELF header flags from %B"),
+ ibfd);
_bfd_error_handler (_(" the input file's flags: %s"),
describe_flags (new_flags));
_bfd_error_handler (_(" the output file's flags: %s"),
asection *sec,
const Elf_Internal_Rela *relocs)
{
- const char *name;
bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
sym_hashes = elf_sym_hashes (abfd);
extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
- name = bfd_get_section_name (abfd, sec);
-
if (dynobj == NULL)
{
sgot = NULL;
{
_bfd_error_handler
/* 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);
return FALSE;
}
asection *sec,
const Elf_Internal_Rela *relocs)
{
- const char *name;
bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
sym_hashes = elf_sym_hashes (abfd);
extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
- name = bfd_get_section_name (abfd, sec);
-
if (dynobj == NULL)
{
sgot = NULL;
{
_bfd_error_handler
/* 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);
return FALSE;
}
if (bfd_get_arch_size (ibfd) == 32
&& bfd_get_arch_size (obfd) == 64)
/* 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
&& bfd_get_arch_size (obfd) == 32)
/* 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
/* 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_get_filename (obfd));
+ _bfd_error_handler (msg, ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
{
_bfd_error_handler
- ("%s: uses non-SH64 instructions while previous modules use SH64 instructions",
- bfd_get_filename (ibfd));
+ ("%B: uses non-SH64 instructions while previous modules"
+ " use SH64 instructions",
+ ibfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
/* Make sure we don't get confused on invalid input. */
_bfd_error_handler
- (_("%s: encountered datalabel symbol in input"),
- bfd_get_filename (abfd));
+ (_("%B: encountered datalabel symbol in input"), abfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
if ((insn & SHMEDIA_PTB_BIT) != 0)
{
_bfd_error_handler
- (_("%s: GAS error: unexpected PTB insn with R_SH_PT_16"),
- bfd_get_filename (input_section->owner));
+ (_("%B: GAS error: unexpected PTB insn with R_SH_PT_16"),
+ input_section->owner);
return FALSE;
}
{
bfd_set_error (bfd_error_file_truncated);
_bfd_error_handler
- (_("%s: could not write out added .cranges entries"),
- bfd_get_filename (abfd));
+ (_("%B: could not write out added .cranges entries"), abfd);
}
}
{
bfd_set_error (bfd_error_file_truncated);
_bfd_error_handler
- (_("%s: could not write out sorted .cranges entries"),
- bfd_get_filename (abfd));
+ (_("%B: could not write out sorted .cranges entries"), abfd);
}
}
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: 0x%lx: warning: R_V850_LONGCALL points to "
+ (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
"unrecognized insns"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset);
+ abfd, (unsigned long) irel->r_offset);
continue;
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd),
+ abfd,
(unsigned long) irel->r_offset + no_match,
insn[no_match]);
continue;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: 0x%lx: warning: R_V850_LONGCALL points to "
+ (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
"unrecognized reloc"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset);
+ abfd, (unsigned long) irel->r_offset);
continue;
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset,
+ abfd, (unsigned long) irel->r_offset,
irelcall->r_offset);
continue;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: 0x%lx: warning: R_V850_LONGJUMP points to "
+ (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
"unrecognized insns"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset);
+ abfd, (unsigned long) irel->r_offset);
continue;
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd),
+ abfd,
(unsigned long) irel->r_offset + no_match,
insn[no_match]);
continue;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: 0x%lx: warning: R_V850_LONGJUMP points to "
+ (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
"unrecognized reloc"),
- bfd_get_filename (abfd), (unsigned long) irel->r_offset);
+ abfd, (unsigned long) irel->r_offset);
continue;
}
if (eh->got_addend != (bfd_vma) rel->r_addend)
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), rel->r_addend,
- h->root.root.string,
+ abfd, rel->r_addend, h->root.root.string,
eh->got_addend);
}
else if (rel->r_addend != 0)
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: warning: PLT addend of %d to `%s' from %s section ignored"),
- bfd_get_filename (input_bfd), rel->r_addend,
- h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: warning: PLT addend of %d to `%s'"
+ " from %A section ignored"),
+ input_bfd, rel->r_addend, h->root.root.string, input_section);
rel->r_addend = 0;
break;
if (h != NULL)
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: warning: %s relocation against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd), howto->name,
- h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: warning: %s relocation against symbol `%s'"
+ " from %A section"),
+ input_bfd, howto->name, h->root.root.string,
+ input_section);
else
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: warning: %s relocation to 0x%x from %s section"),
- bfd_get_filename (input_bfd), howto->name,
- outrel.r_addend,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: warning: %s relocation to 0x%x from %A section"),
+ input_bfd, howto->name, outrel.r_addend,
+ input_section);
}
loc = sreloc->contents;
loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela);
if (mismatch)
_bfd_error_handler
/* 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"),
- bfd_get_filename (ibfd), new_opt_with, opt_arch, old_opt_with,
- opt_arch);
+ ibfd, new_opt_with, opt_arch, old_opt_with, opt_arch);
}
return TRUE;
overflow:
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: short data segment overflowed (0x%lx >= 0x400000)"),
- bfd_get_filename (abfd),
- (unsigned long) (max_short_vma - min_short_vma));
+ (_("%B: short data segment overflowed (0x%lx >= 0x400000)"),
+ abfd, (unsigned long) (max_short_vma - min_short_vma));
return FALSE;
}
else if ((gp_val > min_short_vma
&& max_short_vma - gp_val >= 0x200000))
{
_bfd_error_handler
- (_("%s: __gp does not cover short data segment"),
- bfd_get_filename (abfd));
+ (_("%B: __gp does not cover short data segment"), abfd);
return FALSE;
}
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (isec->owner),
+ isec->owner,
(unsigned long) (value >> 32), (unsigned long) value,
(unsigned long) (gregdata->reloc_request[bpo_index].value
>> 32),
if (symname == NULL || *symname == 0)
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: base-plus-offset relocation against register symbol: (unknown) in %s"),
- bfd_get_filename (input_section->owner),
- bfd_get_section_name (symsec->owner, symsec));
+ (_("%B: base-plus-offset relocation against register symbol:"
+ " (unknown) in %A"),
+ input_section->owner, symsec);
else
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: base-plus-offset relocation against register symbol: %s in %s"),
- bfd_get_filename (input_section->owner), symname,
- bfd_get_section_name (symsec->owner, symsec));
+ (_("%B: base-plus-offset relocation against register symbol:"
+ " %s in %A"),
+ input_section->owner, symname, symsec);
return bfd_reloc_overflow;
}
goto do_mmix_reloc;
if (symname == NULL || *symname == 0)
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: register relocation against non-register symbol: (unknown) in %s"),
- bfd_get_filename (input_section->owner),
- bfd_get_section_name (symsec->owner, symsec));
+ (_("%B: register relocation against non-register symbol:"
+ " (unknown) in %A"),
+ input_section->owner, symsec);
else
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: register relocation against non-register symbol: %s in %s"),
- bfd_get_filename (input_section->owner), symname,
- bfd_get_section_name (symsec->owner, symsec));
+ (_("%B: register relocation against non-register symbol:"
+ " %s in %A"),
+ input_section->owner, symname, symsec);
/* The bfd_reloc_outofrange return value, though intuitively a
better value, will not get us an error. */
MMIX_REG_SECTION_NAME) != 0)
{
_bfd_error_handler
- (_("%s: directive LOCAL valid only with a register or absolute value"),
- bfd_get_filename (input_section->owner));
+ (_("%B: directive LOCAL valid only with a register or absolute value"),
+ input_section->owner);
return bfd_reloc_overflow;
}
/* FIXME: Better error message. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld."),
- bfd_get_filename (input_section->owner), (long) srel, (long) first_global);
+ (_("%B: LOCAL directive: Register $%ld is not a local register."
+ " First global register is $%ld."),
+ input_section->owner, (long) srel, (long) first_global);
return bfd_reloc_overflow;
}
h->u.def.section->owner is NULL. */
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), *namep,
+ abfd, *namep,
*namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX));
bfd_set_error (bfd_error_bad_value);
return FALSE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: error: unaligned relocation type %d at %08x reloc %08x\n"),
- bfd_get_filename (input_bfd), (int)r_type, (unsigned)rel->r_offset, (unsigned)relocation);
+ (_("%B: error: unaligned relocation type %d at %08x reloc %08x\n"),
+ input_bfd, (int) r_type, (unsigned) rel->r_offset,
+ (unsigned) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
if (bfd_get_arch_size (ibfd) == 32
&& bfd_get_arch_size (obfd) == 64)
/* 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
&& bfd_get_arch_size (obfd) == 32)
/* 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
/* 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_get_filename (obfd));
+ _bfd_error_handler (msg, ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
{
_bfd_error_handler
- ("%s: does not use the SH64 64-bit ABI as previous modules do",
- bfd_get_filename (ibfd));
+ ("%B: does not use the SH64 64-bit ABI as previous modules do", ibfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
/* Make sure we don't get confused on invalid input. */
_bfd_error_handler
- (_("%s: encountered datalabel symbol in input"),
- bfd_get_filename (abfd));
+ (_("%B: encountered datalabel symbol in input"), abfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
So we are kind, and reset the string index value to 0
so that at least some processing can be done. */
i_ehdrp->e_shstrndx = SHN_UNDEF;
- _bfd_error_handler (_("warning: %s has a corrupt string table index - ignoring"),
- abfd->filename);
+ _bfd_error_handler
+ (_("warning: %B has a corrupt string table index - ignoring"),
+ abfd);
}
}
else if (i_ehdrp->e_shstrndx != SHN_UNDEF)
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: version count (%ld) does not match symbol count (%ld)"),
- abfd->filename,
+ (_("%B: version count (%ld) does not match symbol count (%ld)"),
+ abfd,
(long) (verhdr->sh_size / sizeof (Elf_External_Versym)),
symcount);
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s(%s): relocation %d has invalid symbol index %ld"),
- abfd->filename, asect->name, i, ELF_R_SYM (rela.r_info));
+ (_("%B(%A): relocation %d has invalid symbol index %ld"),
+ abfd, asect, i, ELF_R_SYM (rela.r_info));
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
}
else
if (stub_entry == NULL)
{
/* 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);
return NULL;
}
overflow:
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: short data segment overflowed (0x%lx >= 0x400000)"),
- bfd_get_filename (abfd),
- (unsigned long) (max_short_vma - min_short_vma));
+ (_("%B: short data segment overflowed (0x%lx >= 0x400000)"),
+ abfd, (unsigned long) (max_short_vma - min_short_vma));
return FALSE;
}
else if ((gp_val > min_short_vma
&& max_short_vma - gp_val >= 0x200000))
{
_bfd_error_handler
- (_("%s: __gp does not cover short data segment"),
- bfd_get_filename (abfd));
+ (_("%B: __gp does not cover short data segment"), abfd);
return FALSE;
}
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: illegal section name `%s'"),
- bfd_get_filename (abfd), o->name);
+ (_("%B: illegal section name `%A'"), abfd, o);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
*/
if ((unknown_sections > 0) && (good_sections > 0))
_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",
- abfd->filename);
+ ("%B 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",
+ abfd);
return abfd->xvec;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: string too long (%d chars, max 65535)"),
- bfd_get_filename (abfd), length);
+ (_("%B: string too long (%d chars, max 65535)"), abfd, length);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: unrecognized symbol `%s' flags 0x%x"),
- bfd_get_filename (abfd), bfd_asymbol_name (symbol),
- symbol->flags);
+ (_("%B: unrecognized symbol `%s' flags 0x%x"),
+ abfd, bfd_asymbol_name (symbol), symbol->flags);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
sprintf_vma (buf, where);
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: address 0x%s out of range for Intel Hex file"),
- bfd_get_filename (abfd), buf);
+ (_("%B: address 0x%s out of range for Intel Hex file"),
+ abfd, buf);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
if (!bfd_link_relocatable (info)
&& strcmp (name, "__gnu_lto_slim") == 0)
_bfd_error_handler
- (_("%s: plugin needed to handle lto object"),
- bfd_get_filename (abfd));
+ (_("%B: plugin needed to handle lto object"), abfd);
}
else
row = DEF_ROW;
if (offset > sec->rawsize)
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: access beyond end of merged section (%ld)"),
- bfd_get_filename (sec->owner), (long) offset);
+ (_("%B: access beyond end of merged section (%ld)"),
+ sec->owner, (long) offset);
return secinfo->first_str ? sec->size : 0;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: No core to allocate section name %s\n"),
- bfd_get_filename (abfd), secname);
+ (_("%B: No core to allocate section name %s\n"),
+ abfd, secname);
bfd_set_error (bfd_error_system_call);
return NULL;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: No core to allocate a symbol %d bytes long\n"),
- bfd_get_filename (abfd), abfd->tdata.mmo_data->max_symbol_length);
+ (_("%B: No core to allocate a symbol %d bytes long\n"),
+ abfd, abfd->tdata.mmo_data->max_symbol_length);
goto bad_final;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: attempt to emit contents at non-multiple-of-4 address 0x%lx\n"),
- bfd_get_filename (abfd), (unsigned long) vma);
+ (_("%B: attempt to emit contents at non-multiple-of-4"
+ " address 0x%lx\n"),
+ abfd, (unsigned long) vma);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
&& !mmo_ignore_symbol_consistency (abfd))
{
_bfd_error_handler
- (_("%s: invalid mmo file: initialization value for $255 is not `Main'\n"),
- bfd_get_filename (abfd));
+ (_("%B: invalid mmo file: initialization value for $255"
+ " is not `Main'\n"),
+ abfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: unsupported wide character sequence"
+ (_("%B: unsupported wide character sequence"
" 0x%02X 0x%02X after symbol name starting with `%s'\n"),
- bfd_get_filename (abfd), c, c2,
- abfd->tdata.mmo_data->lop_stab_symbol);
+ abfd, c, c2, abfd->tdata.mmo_data->lop_stab_symbol);
bfd_set_error (bfd_error_bad_value);
abfd->tdata.mmo_data->have_error = TRUE;
return FALSE;
default:
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid mmo file: unsupported lopcode `%d'\n"),
- bfd_get_filename (abfd), buf[1]);
+ (_("%B: invalid mmo file: unsupported lopcode `%d'\n"),
+ abfd, buf[1]);
bfd_set_error (bfd_error_bad_value);
goto error_return;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"),
- bfd_get_filename (abfd), y*256+z);
+ (_("%B: invalid mmo file: expected YZ = 1"
+ " got YZ = %d for lop_quote\n"),
+ abfd, y*256+z);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"),
- bfd_get_filename (abfd), z);
+ (_("%B: invalid mmo file: expected z = 1 or z = 2,"
+ " got z = %d for lop_loc\n"),
+ abfd, z);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"),
- bfd_get_filename (abfd), z);
+ (_("%B: invalid mmo file: expected z = 1 or z = 2,"
+ " got z = %d for lop_fixo\n"),
+ abfd, z);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"),
- bfd_get_filename (abfd), y);
+ (_("%B: invalid mmo file: expected y = 0,"
+ " got y = %d for lop_fixrx\n"),
+ abfd, y);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"),
- bfd_get_filename (abfd), z);
+ (_("%B: invalid mmo file: expected z = 16 or z = 24,"
+ " got z = %d for lop_fixrx\n"),
+ abfd, z);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"),
- bfd_get_filename (abfd), buf[0]);
+ (_("%B: invalid mmo file: leading byte of operand word"
+ " must be 0 or 1, got %d for lop_fixrx\n"),
+ abfd, buf[0]);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: cannot allocate file name for file number %d, %d bytes\n"),
- bfd_get_filename (abfd), y, z * 4 + 1);
+ (_("%B: cannot allocate file name for file number %d,"
+ " %d bytes\n"),
+ abfd, y, z * 4 + 1);
bfd_set_error (bfd_error_system_call);
goto error_return;
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), y, fname, file_names[y]);
+ abfd, y, fname, file_names[y]);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), y);
+ abfd, y);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), y, z);
+ abfd, y, z);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd));
+ abfd);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
{
_bfd_error_handler
/* 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"
" lop_stab (%ld)\n"),
- bfd_get_filename (abfd), (long) (y * 256 + z),
+ abfd, (long) (y * 256 + z),
(curpos - stab_loc - 4)/4);
bfd_set_error (bfd_error_bad_value);
goto error_return;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: invalid symbol table: duplicate symbol `%s'\n"),
- bfd_get_filename (abfd), trie->sym.name);
+ (_("%B: invalid symbol table: duplicate symbol `%s'\n"),
+ abfd, trie->sym.name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), vmas_main, vmas_start);
+ abfd, vmas_main, vmas_start);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), trie_len);
+ abfd, trie_len);
memset (&sym, 0, sizeof (sym));
sym.sym_type = mmo_abs_sym;
diagnostic and fail "normally". */
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd), trie_len,
+ abfd, trie_len,
(abfd->tdata.mmo_data->byte_no + 3)/4);
bfd_set_error (bfd_error_bad_value);
return FALSE;
this. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: internal error, internal register section %s had"
+ (_("%B: internal error, internal register section %A had"
" contents\n"),
- bfd_get_filename (abfd), sec->name);
+ abfd, sec);
bfd_set_error (bfd_error_bad_value);
infop->retval = FALSE;
return;
if (sec->size == 0)
/* There must always be at least one such register. */
_bfd_error_handler
- (_("%s: no initialized registers; section length 0\n"),
- bfd_get_filename (abfd));
+ (_("%B: no initialized registers; section length 0\n"),
+ abfd);
else if (sec->vma > (256 - 32) * 8)
/* Provide better error message for the case of too many
global registers. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: too many initialized registers; section length %ld\n"),
- bfd_get_filename (abfd),
- (long) sec->size);
+ (_("%B: too many initialized registers; section length %ld\n"),
+ abfd, (long) sec->size);
else
_bfd_error_handler
/* 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"),
- bfd_get_filename (abfd),
- (long) sec->size,
+ abfd, (long) sec->size,
(unsigned long) (sec->vma >> 32), (unsigned long) (sec->vma));
return FALSE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: can not represent section `%s' in oasys"),
- bfd_get_filename (abfd), s->name);
+ (_("%B: can not represent section `%A' in oasys"), abfd, s);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: can not represent section `%s' in a.out object file format"),
- bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
+ (_("%B: can not represent section `%A' in a.out object file format"),
+ abfd, section);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
by the reloc size. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: relocatable link from %s to %s not supported"),
- bfd_get_filename (abfd),
- sub->xvec->name, abfd->xvec->name);
+ (_("%B: relocatable link from %s to %s not supported"),
+ abfd, sub->xvec->name, abfd->xvec->name);
bfd_set_error (bfd_error_invalid_operation);
goto error_return;
}
else
{
/* xgettext:c-format */
- _bfd_error_handler (_("%s: line number overflow: 0x%lx > 0xffff"),
- bfd_get_filename (abfd),
- scnhdr_int->s_nlnno);
+ _bfd_error_handler (_("%B: line number overflow: 0x%lx > 0xffff"),
+ abfd, scnhdr_int->s_nlnno);
bfd_set_error (bfd_error_file_truncated);
H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nlnno);
ret = 0;
if (data > dataend)
{
/* Corrupted .rsrc section - cannot merge. */
- _bfd_error_handler (_("%s: .rsrc merge failure: corrupt .rsrc section"),
- bfd_get_filename (abfd));
+ _bfd_error_handler (_("%B: .rsrc merge failure: corrupt .rsrc section"),
+ abfd);
bfd_set_error (bfd_error_file_truncated);
goto end;
}
if ((data - p) > rsrc_sizes [num_resource_sets])
{
- _bfd_error_handler (_("%s: .rsrc merge failure: unexpected .rsrc size"),
- bfd_get_filename (abfd));
+ _bfd_error_handler (_("%B: .rsrc merge failure: unexpected .rsrc size"),
+ abfd);
bfd_set_error (bfd_error_file_truncated);
goto end;
}
/* Issue warning if the core file was truncated during writing. */
if (c_flag & CORE_TRUNC)
- _bfd_error_handler (_("%s: warning core file truncated"),
- bfd_get_filename (abfd));
+ _bfd_error_handler (_("%B: warning core file truncated"), abfd);
/* Allocate core file header. */
#ifndef BFD64
if (section->reloc_count == 0)
_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
else
/* Regular relocs are intertwined with binary data. */
if (curr_addr > addr)
- _bfd_error_handler (_("Size error in section %s"),
- section->name);
+ _bfd_error_handler (_("Size error in section %A"),
+ section);
size = addr - curr_addr;
sto_imm (abfd, section, size, curr_data, curr_addr);
curr_data += size;
{
/* Output rest of section. */
if (curr_addr > section->size)
- _bfd_error_handler (_("Size error in section %s"),
- section->name);
+ _bfd_error_handler (_("Size error in section %A"), section);
size = section->size - curr_addr;
sto_imm (abfd, section, size, curr_data, curr_addr);
curr_data += size;
if (info->output_bfd->xvec != abfd->xvec)
{
_bfd_error_handler
- (_("%s: XCOFF shared object when not producing XCOFF output"),
- bfd_get_filename (abfd));
+ (_("%B: XCOFF shared object when not producing XCOFF output"),
+ abfd);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
if (lsec == NULL)
{
_bfd_error_handler
- (_("%s: dynamic object with no .loader section"),
- bfd_get_filename (abfd));
+ (_("%B: dynamic object with no .loader section"),
+ abfd);
bfd_set_error (bfd_error_no_symbols);
return FALSE;
}