From 871b3ab29e87cf0de15f7e49ad19acc4f7f6f84c Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 19 Feb 2018 15:21:40 +1030 Subject: Use %pA and %pB in messages rather than %A and %B First step towards compiler verification of _bfd_error_handler arguments, and better verification of translated messages. bfd/ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. ld/ * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B. * ldcref.c: Update all messages using %A and %B. * ldexp.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/xtensaelf.em: Likewise. --- bfd/elf64-ppc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'bfd/elf64-ppc.c') diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 2d43df89..b6c6105 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -2514,7 +2514,7 @@ ppc64_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, if (type >= ARRAY_SIZE (ppc64_elf_howto_table)) { /* xgettext:c-format */ - _bfd_error_handler (_("%B: invalid relocation type %d"), + _bfd_error_handler (_("%pB: invalid relocation type %d"), abfd, (int) type); type = R_PPC64_NONE; } @@ -4647,7 +4647,7 @@ ppc_add_stub (const char *stub_name, if (stub_entry == NULL) { /* xgettext:c-format */ - info->callbacks->einfo (_("%P: %B: cannot create stub entry %s\n"), + info->callbacks->einfo (_("%P: %pB: cannot create stub entry %s\n"), section->owner, stub_name); return NULL; } @@ -5153,7 +5153,7 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) else if (abiversion (ibfd) >= 2) { /* xgettext:c-format */ - info->callbacks->einfo (_("%P: %B .opd not allowed in ABI" + info->callbacks->einfo (_("%P: %pB .opd not allowed in ABI" " version %d\n"), ibfd, abiversion (ibfd)); bfd_set_error (bfd_error_bad_value); @@ -6042,7 +6042,7 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler /* xgettext:c-format */ - (_("%B uses unknown e_flags 0x%lx"), ibfd, iflags); + (_("%pB uses unknown e_flags 0x%lx"), ibfd, iflags); bfd_set_error (bfd_error_bad_value); return FALSE; } @@ -6050,7 +6050,7 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler /* xgettext:c-format */ - (_("%B: ABI version %ld is not compatible with ABI version %ld output"), + (_("%pB: ABI version %ld is not compatible with ABI version %ld output"), ibfd, iflags, oflags); bfd_set_error (bfd_error_bad_value); return FALSE; @@ -7529,7 +7529,7 @@ tocsave_find (struct ppc_link_hash_table *htab, if (ent.sec == NULL || ent.sec->output_section == NULL) { _bfd_error_handler - (_("%B: undefined symbol on R_PPC64_TOCSAVE relocation"), ibfd); + (_("%pB: undefined symbol on R_PPC64_TOCSAVE relocation"), ibfd); return NULL; } @@ -7756,7 +7756,7 @@ dec_dynrel_count (bfd_vma r_info, } /* xgettext:c-format */ - info->callbacks->einfo (_("%P: dynreloc miscount for %B, section %A\n"), + info->callbacks->einfo (_("%P: dynreloc miscount for %pB, section %pA\n"), sec->owner, sec); bfd_set_error (bfd_error_bad_value); return FALSE; @@ -7845,7 +7845,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) optimization for them! */ broken_opd: _bfd_error_handler - (_("%B: .opd is not a regular array of opd entries"), ibfd); + (_("%pB: .opd is not a regular array of opd entries"), ibfd); broken = TRUE; break; } @@ -7855,7 +7855,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) { _bfd_error_handler /* xgettext:c-format */ - (_("%B: unexpected reloc type %u in .opd section"), + (_("%pB: unexpected reloc type %u in .opd section"), ibfd, r_type); broken = TRUE; break; @@ -7877,7 +7877,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) _bfd_error_handler /* xgettext:c-format */ - (_("%B: undefined sym `%s' in .opd section"), + (_("%pB: undefined sym `%s' in .opd section"), ibfd, sym_name); broken = TRUE; break; @@ -9933,7 +9933,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *inf) info->flags |= DF_TEXTREL; info->callbacks->minfo - (_("%B: dynamic relocation against `%T' in read-only section `%A'\n"), + (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"), sec->owner, h->root.root.string, sec); /* Not an error, just cut short the traversal. */ @@ -12128,7 +12128,7 @@ group_sections (struct bfd_link_info *info, big_sec = total > group_size; if (big_sec && !suppress_size_errors) /* xgettext:c-format */ - _bfd_error_handler (_("%B section %A exceeds stub group size"), + _bfd_error_handler (_("%pB section %pA exceeds stub group size"), tail->owner, tail); curr_toc = htab->sec_info[tail->id].toc_off; @@ -14354,7 +14354,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, default: info->callbacks->einfo /* xgettext:c-format */ - (_("%P: %B: unknown relocation type %d for `%T'\n"), + (_("%P: %pB: unknown relocation type %d for `%T'\n"), input_bfd, (int) r_type, sym_name); bfd_set_error (bfd_error_bad_value); @@ -15015,7 +15015,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, info->callbacks->einfo /* xgettext:c-format */ - (_("%P: %B: %s is not supported for `%T'\n"), + (_("%P: %pB: %s is not supported for `%T'\n"), input_bfd, ppc64_elf_howto_table[r_type]->name, sym_name); -- cgit v1.1