diff options
author | Alan Modra <amodra@gmail.com> | 2018-02-19 15:21:40 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-02-19 23:55:53 +1030 |
commit | 871b3ab29e87cf0de15f7e49ad19acc4f7f6f84c (patch) | |
tree | e9a8ced3df4cd2541bddf01031b65da61cf98e47 /bfd/elf32-ppc.c | |
parent | f61f94ec1bf9cb3d32b38a90a1f5c2d58ececbfb (diff) | |
download | gdb-871b3ab29e87cf0de15f7e49ad19acc4f7f6f84c.zip gdb-871b3ab29e87cf0de15f7e49ad19acc4f7f6f84c.tar.gz gdb-871b3ab29e87cf0de15f7e49ad19acc4f7f6f84c.tar.bz2 |
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.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 092b1ce..1cacb79 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -2029,7 +2029,7 @@ ppc_elf_info_to_howto (bfd *abfd, if (r_type >= R_PPC_max) { /* xgettext:c-format */ - _bfd_error_handler (_("%B: unrecognised PPC reloc number: %d"), + _bfd_error_handler (_("%pB: unrecognised PPC reloc number: %d"), abfd, r_type); bfd_set_error (bfd_error_bad_value); r_type = R_PPC_NONE; @@ -2041,7 +2041,7 @@ ppc_elf_info_to_howto (bfd *abfd, if (!cache_ptr->howto) { /* xgettext:c-format */ - _bfd_error_handler (_("%B: invalid relocation type %d"), + _bfd_error_handler (_("%pB: invalid relocation type %d"), abfd, r_type); bfd_set_error (bfd_error_bad_value); @@ -2734,7 +2734,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info) continue; /* xgettext:c-format */ - error_message = _("corrupt %s section in %B"); + error_message = _("corrupt %s section in %pB"); length = asec->size; if (length < 20) goto fail; @@ -2754,7 +2754,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info) || (bfd_bread (buffer, length, ibfd) != length)) { /* xgettext:c-format */ - error_message = _("unable to read in %s section from %B"); + error_message = _("unable to read in %s section from %pB"); goto fail; } @@ -2796,7 +2796,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info) { ibfd = abfd; /* xgettext:c-format */ - error_message = _("warning: unable to set size of %s section in %B"); + error_message = _("warning: unable to set size of %s section in %pB"); } } @@ -3925,7 +3925,7 @@ bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type) { _bfd_error_handler /* xgettext:c-format */ - (_("%B: relocation %s cannot be used when making a shared object"), + (_("%pB: relocation %s cannot be used when making a shared object"), abfd, ppc_elf_howto_table[r_type]->name); bfd_set_error (bfd_error_bad_value); @@ -3962,7 +3962,7 @@ ppc_elf_check_relocs (bfd *abfd, return TRUE; #ifdef DEBUG - _bfd_error_handler ("ppc_elf_check_relocs called for section %A in %B", + _bfd_error_handler ("ppc_elf_check_relocs called for section %pA in %pB", sec, abfd); #endif @@ -4638,21 +4638,21 @@ _bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, struct bfd_link_info *info) else if (out_fp != 2 && in_fp == 2) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses hard float, %B uses soft float"), obfd, ibfd); + (_("Warning: %pB uses hard float, %pB uses soft float"), obfd, ibfd); else if (out_fp == 2 && in_fp != 2) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses hard float, %B uses soft float"), ibfd, obfd); + (_("Warning: %pB uses hard float, %pB uses soft float"), ibfd, obfd); else if (out_fp == 1 && in_fp == 3) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses double-precision hard float, " - "%B uses single-precision hard float"), obfd, ibfd); + (_("Warning: %pB uses double-precision hard float, " + "%pB uses single-precision hard float"), obfd, ibfd); else if (out_fp == 3 && in_fp == 1) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses double-precision hard float, " - "%B uses single-precision hard float"), ibfd, obfd); + (_("Warning: %pB uses double-precision hard float, " + "%pB uses single-precision hard float"), ibfd, obfd); in_fp = in_attr->i & 0xc; out_fp = out_attr->i & 0xc; @@ -4666,23 +4666,23 @@ _bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, struct bfd_link_info *info) else if (out_fp != 2 * 4 && in_fp == 2 * 4) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses 64-bit long double, " - "%B uses 128-bit long double"), ibfd, obfd); + (_("Warning: %pB uses 64-bit long double, " + "%pB uses 128-bit long double"), ibfd, obfd); else if (in_fp != 2 * 4 && out_fp == 2 * 4) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses 64-bit long double, " - "%B uses 128-bit long double"), obfd, ibfd); + (_("Warning: %pB uses 64-bit long double, " + "%pB uses 128-bit long double"), obfd, ibfd); else if (out_fp == 1 * 4 && in_fp == 3 * 4) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses IBM long double, " - "%B uses IEEE long double"), ibfd, obfd); + (_("Warning: %pB uses IBM long double, " + "%pB uses IEEE long double"), ibfd, obfd); else if (out_fp == 3 * 4 && in_fp == 1 * 4) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses IBM long double, " - "%B uses IEEE long double"), obfd, ibfd); + (_("Warning: %pB uses IBM long double, " + "%pB uses IEEE long double"), obfd, ibfd); } } @@ -4732,12 +4732,12 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) else if (out_vec < in_vec) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses AltiVec vector ABI, %B uses SPE vector ABI"), + (_("Warning: %pB uses AltiVec vector ABI, %pB uses SPE vector ABI"), obfd, ibfd); else if (out_vec > in_vec) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses AltiVec vector ABI, %B uses SPE vector ABI"), + (_("Warning: %pB uses AltiVec vector ABI, %pB uses SPE vector ABI"), ibfd, obfd); } @@ -4760,13 +4760,13 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) else if (out_struct < in_struct) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses r3/r4 for small structure returns, " - "%B uses memory"), obfd, ibfd); + (_("Warning: %pB uses r3/r4 for small structure returns, " + "%pB uses memory"), obfd, ibfd); else if (out_struct > in_struct) _bfd_error_handler /* xgettext:c-format */ - (_("Warning: %B uses r3/r4 for small structure returns, " - "%B uses memory"), ibfd, obfd); + (_("Warning: %pB uses r3/r4 for small structure returns, " + "%pB uses memory"), ibfd, obfd); } /* Merge Tag_compatibility attributes and any common GNU ones. */ @@ -4820,7 +4820,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { error = TRUE; _bfd_error_handler - (_("%B: compiled with -mrelocatable and linked with " + (_("%pB: compiled with -mrelocatable and linked with " "modules compiled normally"), ibfd); } else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0 @@ -4828,7 +4828,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { error = TRUE; _bfd_error_handler - (_("%B: compiled normally and linked with " + (_("%pB: compiled normally and linked with " "modules compiled with -mrelocatable"), ibfd); } @@ -4856,7 +4856,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) error = TRUE; _bfd_error_handler /* xgettext:c-format */ - (_("%B: uses different e_flags (%#x) fields " + (_("%pB: uses different e_flags (%#x) fields " "than previous modules (%#x)"), ibfd, new_flags, old_flags); } @@ -4897,7 +4897,7 @@ ppc_elf_vle_split16 (bfd *input_bfd, else _bfd_error_handler /* xgettext:c-format */ - (_("%B(%A+0x%lx): expected 16A style relocation on 0x%08x insn"), + (_("%pB(%pA+0x%lx): expected 16A style relocation on 0x%08x insn"), input_bfd, input_section, offset, opcode); } } @@ -4916,7 +4916,7 @@ ppc_elf_vle_split16 (bfd *input_bfd, else _bfd_error_handler /* xgettext:c-format */ - (_("%B(%A+0x%lx): expected 16D style relocation on 0x%08x insn"), + (_("%pB(%pA+0x%lx): expected 16D style relocation on 0x%08x insn"), input_bfd, input_section, offset, opcode); } } @@ -5007,7 +5007,7 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED, if (htab->plt_type == PLT_OLD && htab->params->plt_style == PLT_NEW) { if (htab->old_bfd != NULL) - info->callbacks->einfo (_("%P: bss-plt forced due to %B\n"), + info->callbacks->einfo (_("%P: bss-plt forced due to %pB\n"), htab->old_bfd); else info->callbacks->einfo (_("%P: bss-plt forced by profiling\n")); @@ -6163,7 +6163,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p) 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. */ @@ -6271,7 +6271,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, == (SEC_READONLY | SEC_ALLOC)) { info->flags |= DF_TEXTREL; - info->callbacks->minfo (_("%B: dynamic relocation in read-only section `%A'\n"), + info->callbacks->minfo (_("%pB: dynamic relocation in read-only section `%pA'\n"), p->sec->owner, p->sec); } } @@ -7695,7 +7695,7 @@ ppc_elf_relocate_section (bfd *output_bfd, struct ppc_elf_relax_info *relax_info = NULL; #ifdef DEBUG - _bfd_error_handler ("ppc_elf_relocate_section called for %B section %A, " + _bfd_error_handler ("ppc_elf_relocate_section called for %pB section %pA, " "%ld relocations%s", input_bfd, input_section, (long) input_section->reloc_count, @@ -8161,7 +8161,7 @@ ppc_elf_relocate_section (bfd *output_bfd, else _bfd_error_handler /* xgettext:c-format */ - (_("%B(%A+%#Lx): error: %s with unexpected instruction %#x"), + (_("%pB(%pA+%#Lx): error: %s with unexpected instruction %#x"), input_bfd, input_section, rel->r_offset, "R_PPC_ADDR16_HA", insn); } @@ -8196,7 +8196,7 @@ ppc_elf_relocate_section (bfd *output_bfd, else _bfd_error_handler /* xgettext:c-format */ - (_("%B(%A+%#Lx): error: %s with unexpected instruction %#x"), + (_("%pB(%pA+%#Lx): error: %s with unexpected instruction %#x"), input_bfd, input_section, rel->r_offset, "R_PPC_ADDR16_LO", insn); } @@ -8341,7 +8341,7 @@ ppc_elf_relocate_section (bfd *output_bfd, default: info->callbacks->einfo /* xgettext:c-format */ - (_("%P: %B: unknown relocation type %d for symbol %s\n"), + (_("%P: %pB: unknown relocation type %d for symbol %s\n"), input_bfd, (int) r_type, sym_name); bfd_set_error (bfd_error_bad_value); @@ -9099,7 +9099,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { info->callbacks->einfo /* xgettext:c-format */ - (_("%P: %B: the target (%s) of a %s relocation is " + (_("%P: %pB: the target (%s) of a %s relocation is " "in the wrong output section (%s)\n"), input_bfd, sym_name, @@ -9130,7 +9130,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { info->callbacks->einfo /* xgettext:c-format */ - (_("%P: %B: the target (%s) of a %s relocation is " + (_("%P: %pB: the target (%s) of a %s relocation is " "in the wrong output section (%s)\n"), input_bfd, sym_name, @@ -9221,7 +9221,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { info->callbacks->einfo /* xgettext:c-format */ - (_("%P: %B: the target (%s) of a %s relocation is " + (_("%P: %pB: the target (%s) of a %s relocation is " "in the wrong output section (%s)\n"), input_bfd, sym_name, @@ -9309,7 +9309,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { _bfd_error_handler /* xgettext:c-format */ - (_("%B: the target (%s) of a %s relocation is " + (_("%pB: the target (%s) of a %s relocation is " "in the wrong output section (%s)"), input_bfd, sym_name, @@ -9417,7 +9417,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_EMB_BIT_FLD: info->callbacks->einfo /* xgettext:c-format */ - (_("%P: %B: relocation %s is not yet supported for symbol %s\n"), + (_("%P: %pB: relocation %s is not yet supported for symbol %s\n"), input_bfd, howto->name, sym_name); |