From 695344c018c8e462280c47a644df02ea472b0a4e Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 19 Oct 2016 14:04:34 +0100 Subject: Add c-format tags to translatable strings with more than one argument-using formatting token. * aout-adobe.c: Add missing c-format tags for translatable strings. * aout-cris.c: Likewise. * aoutx.h: Likewise. * bfd.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. * cpu-arm.c: Likewise. * dwarf2.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.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-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.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. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * m68klinux.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. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * ppcboot.c: Likewise. * reloc.c: Likewise. * sparclinux.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * xcofflink.c: Likewise. --- bfd/elf32-nds32.c | 111 +++++++++++++++++++++++++----------------------------- 1 file changed, 52 insertions(+), 59 deletions(-) (limited to 'bfd/elf32-nds32.c') diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index fdeada7..ab19801 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -2970,6 +2970,7 @@ nds32_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, r_type = ELF32_R_TYPE (dst->r_info); if (r_type > R_NDS32_GNU_VTENTRY) { + /* xgettext:c-format */ _bfd_error_handler (_("%B: invalid NDS32 reloc number: %d"), abfd, r_type); r_type = 0; } @@ -4562,6 +4563,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, r_type = ELF32_R_TYPE (rel->r_info); if (r_type >= R_NDS32_max) { + /* xgettext:c-format */ _bfd_error_handler (_("%B: error: unknown relocation type %d."), input_bfd, r_type); bfd_set_error (bfd_error_bad_value); @@ -5205,6 +5207,7 @@ handle_sda: { /* Incorrect alignment. */ _bfd_error_handler + /* xgettext:c-format */ (_("%B(%A): warning: unaligned small data access of type %d."), input_bfd, input_section, r_type); ret = FALSE; @@ -5970,6 +5973,7 @@ nds32_check_vec_size (bfd *ibfd) else if (nds32_vec_size != (flag_t & 0x3)) { _bfd_error_handler + /* xgettext:c-format */ (_("%B: ISR vector size mismatch" " with previous modules, previous %u-byte, current %u-byte"), ibfd, @@ -6138,6 +6142,7 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { if (in_version != out_version) _bfd_error_handler + /* xgettext:c-format */ (_("%B: warning: Incompatible elf-versions %s and %s."), ibfd, nds32_elfver_strtab[out_version], nds32_elfver_strtab[in_version]); @@ -8779,8 +8784,7 @@ done_adjust_diff: && (blank_t2->offset > raddr || blank_t2->next->offset <= raddr)) _bfd_error_handler - (_("%B: %s\n"), abfd, - "Error: search_nds32_elf_blank reports wrong node"); + (_("%B: Error: search_nds32_elf_blank reports wrong node\n"), abfd); /* Mark reloc in deleted portion as NONE. For some relocs like R_NDS32_LABEL that doesn't modify the @@ -9037,6 +9041,10 @@ relax_range_measurement (bfd *abfd) #define IS_OPTIMIZE(addend) ((addend) & 0x40000000) #define IS_16BIT_ON(addend) ((addend) & 0x20000000) +static const char * unrecognized_reloc_msg = + /* xgettext:c-format */ + N_("%B: warning: %s points to unrecognized reloc at 0x%lx."); + /* Relax LONGCALL1 relocation for nds32_elf_relax_section. */ static bfd_boolean @@ -9087,9 +9095,8 @@ nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (hi_irelfn == irelend || lo_irelfn == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL1 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL1", + (long) irel->r_offset); return FALSE; } @@ -9169,9 +9176,8 @@ nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (i1_irelfn == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL2 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL2", + (long) irel->r_offset); return FALSE; } @@ -9276,9 +9282,8 @@ nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (hi_irelfn == irelend || lo_irelfn == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL3 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL3", + (long) irel->r_offset); return FALSE; } @@ -9411,9 +9416,8 @@ nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, R_NDS32_LO12S0_ORI_RELA, laddr + 4); if (hi_irelfn == irelend || lo_irelfn == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP1 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP1", + (long) irel->r_offset); return FALSE; } @@ -9618,9 +9622,8 @@ nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (i2_irelfn == irelend || cond_irelfn == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP2 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP2", + (long) irel->r_offset); return FALSE; } @@ -9811,9 +9814,8 @@ nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (hi_irelfn == irelend || lo_irelfn == irelend || cond_irelfn == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP3 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP3", + (long) irel->r_offset); return FALSE; } @@ -9992,9 +9994,8 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (hi_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL4 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4", + (long) irel->r_offset); return FALSE; } @@ -10023,9 +10024,8 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (ptr_irel == irelend || em_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL4 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4", + (long) irel->r_offset); return FALSE; } /* Check these is enough space to insert jal in R_NDS32_EMPTY. */ @@ -10095,9 +10095,8 @@ nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, R_NDS32_25_PCREL_RELA, irel->r_addend); if (cond_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL5 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL5", + (long) irel->r_offset); return FALSE; } @@ -10174,9 +10173,8 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (em_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL6 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL6", + (long) irel->r_offset); return FALSE; } @@ -10213,9 +10211,8 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, R_NDS32_PTR_RESOLVED, irel->r_addend); if (cond_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL6 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, + "R_NDS32_LONGCALL6", (long) irel->r_offset); return FALSE; } cond_irel->r_addend = 1; @@ -10263,9 +10260,8 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, R_NDS32_PTR_RESOLVED, irel->r_addend); if (cond_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGCALL6 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, + "R_NDS32_LONGCALL6", (long) irel->r_offset); return FALSE; } cond_irel->r_addend = 1; @@ -10314,9 +10310,8 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (hi_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP4 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4", + (long) irel->r_offset); return FALSE; } @@ -10337,9 +10332,8 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (ptr_irel == irelend || em_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP4 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4", + (long) irel->r_offset); return FALSE; } @@ -10412,9 +10406,8 @@ nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, R_NDS32_25_PCREL_RELA, irel->r_addend); if (cond_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP5 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP5", + (long) irel->r_offset); return FALSE; } @@ -10542,9 +10535,8 @@ nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (em_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP6 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP6", + (long) irel->r_offset); return FALSE; } @@ -10713,9 +10705,8 @@ nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, R_NDS32_15_PCREL_RELA, irel->r_addend); if (cond_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LONGJUMP7 points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP7", + (long) irel->r_offset); return FALSE; } @@ -10819,9 +10810,8 @@ nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd, if (hi_irelfn == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_LOADSTORE points to unrecognized" - "reloc at 0x%lx.", abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LOADSTORE", + (long) irel->r_offset); return FALSE; } @@ -11294,9 +11284,8 @@ nds32_elf_relax_ptr (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (re_irel == irelend) { - _bfd_error_handler - ("%B: warning: R_NDS32_PTR points to unrecognized reloc at 0x%lx.", - abfd, (long) irel->r_offset); + _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_PTR", + (long) irel->r_offset); return FALSE; } @@ -12788,6 +12777,7 @@ nds32_relax_fp_as_gp (struct bfd_link_info *link_info, { /* Begin of the region. */ if (begin_rel) + /* xgettext:c-format */ _bfd_error_handler (_("%B: Nested OMIT_FP in %A."), abfd, sec); begin_rel = irel; @@ -12806,6 +12796,7 @@ nds32_relax_fp_as_gp (struct bfd_link_info *link_info, if (begin_rel == NULL) { + /* xgettext:c-format */ _bfd_error_handler (_("%B: Unmatched OMIT_FP in %A."), abfd, sec); continue; } @@ -13088,6 +13079,7 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, complete binaries. Do not abort, but issue an error message instead. */ link_info->callbacks->einfo + /* xgettext:c-format */ (_("%X%P: %B(%A): relocation \"%R\" goes out of range\n"), abfd, input_section, * parent); goto error_return; @@ -15497,6 +15489,7 @@ nds32_elf_ex9_build_hash_table (bfd *abfd, asection *sec, { /* Incorrect alignment. */ _bfd_error_handler + /* xgettext:c-format */ (_("%s: warning: unaligned small data access. " "For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."), bfd_get_filename (abfd), irel->r_offset, -- cgit v1.1