%L conversions
authorAlan Modra <amodra@gmail.com>
Mon, 19 Feb 2018 08:04:15 +0000 (18:34 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 19 Feb 2018 13:25:54 +0000 (23:55 +1030)
* bfd-in.h: Include inttypes.h or if not available define
PRId64, PRIu64 and PRIx64.
* bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
modifier to print bfd_vma.
* coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
* coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
* compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
* elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
* elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
* elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
* elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
* elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
* elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
* elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
* elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
* elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
* elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
* elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
* peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
and cast input to uint64_t, and similarly for Ld and Lu.
* bfd-in2.h: Regenerate.

66 files changed:
bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/coff-arm.c
bfd/coff-mcore.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/coff-sh.c
bfd/coff-tic80.c
bfd/coffcode.h
bfd/coffgen.c
bfd/cofflink.c
bfd/compress.c
bfd/dwarf2.c
bfd/elf-m10300.c
bfd/elf.c
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-bfin.c
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-ip2k.c
bfd/elf32-lm32.c
bfd/elf32-m32r.c
bfd/elf32-m68k.c
bfd/elf32-metag.c
bfd/elf32-nds32.c
bfd/elf32-nios2.c
bfd/elf32-ppc.c
bfd/elf32-rx.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-sh64.c
bfd/elf32-spu.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-mmix.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-x86-64.c
bfd/elfcode.h
bfd/elfcore.h
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfnn-riscv.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c
bfd/ieee.c
bfd/ihex.c
bfd/mach-o.c
bfd/merge.c
bfd/mmo.c
bfd/peXXigen.c
bfd/xcofflink.c

index 2a6eeb60473eef8032c9ce0e23a3b7852c433d01..349f2127f8e240cf4f32d28da996af9d5a8fa7bf 100644 (file)
@@ -1,3 +1,27 @@
+2018-02-19  Alan Modra  <amodra@gmail.com>
+
+       * bfd-in.h: Include inttypes.h or if not available define
+       PRId64, PRIu64 and PRIx64.
+       * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
+       modifier to print bfd_vma.
+       * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
+       * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
+       * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
+       * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
+       * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
+       * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
+       * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
+       * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
+       * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
+       * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
+       * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
+       * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
+       * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
+       * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
+       * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
+       and cast input to uint64_t, and similarly for Ld and Lu.
+       * bfd-in2.h: Regenerate.
+
 2018-02-19  Alan Modra  <amodra@gmail.com>
 
        * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
index 2195ce3db7475619f231f59e087ba304cfb81cc0..a06cd740c0b1d9f38d0103b68b4db3ed48e72b20 100644 (file)
@@ -91,6 +91,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t;
 typedef BFD_HOST_U_64_BIT bfd_uint64_t;
 #endif
 
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if BFD_HOST_64BIT_LONG
+#  define BFD_PRI64 "l"
+# elif defined (__MSVCRT__)
+#  define BFD_PRI64 "I64"
+# else
+#  define BFD_PRI64 "ll"
+# endif
+# undef PRId64
+# define PRId64 BFD_PRI64 "d"
+# undef PRIu64
+# define PRIu64 BFD_PRI64 "u"
+# undef PRIx64
+# define PRIx64 BFD_PRI64 "x"
+#endif
+
 #if BFD_ARCH_SIZE >= 64
 #define BFD64
 #endif
index 42991e784860c27039dd050226452f44b8d12c68..e0831359ed793e94ccded28f03cfa33386f3ac30 100644 (file)
@@ -98,6 +98,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t;
 typedef BFD_HOST_U_64_BIT bfd_uint64_t;
 #endif
 
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if BFD_HOST_64BIT_LONG
+#  define BFD_PRI64 "l"
+# elif defined (__MSVCRT__)
+#  define BFD_PRI64 "I64"
+# else
+#  define BFD_PRI64 "ll"
+# endif
+# undef PRId64
+# define PRId64 BFD_PRI64 "d"
+# undef PRIu64
+# define PRIu64 BFD_PRI64 "u"
+# undef PRIx64
+# define PRIx64 BFD_PRI64 "x"
+#endif
+
 #if BFD_ARCH_SIZE >= 64
 #define BFD64
 #endif
index 88f0862d568f00b001c64017e9d6ebb436d9af28..7c9ab25ad05bb82771dceb2b65974a88ad08408c 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -649,10 +649,7 @@ union _bfd_doprnt_args
 };
 
 /* This macro and _bfd_doprnt taken from libiberty _doprnt.c, tidied a
-   little and extended to handle '%pA', '%pB' and positional parameters.
-   'L' as a modifer for integer formats is used for bfd_vma and
-   bfd_size_type args, which vary in size depending on BFD
-   configuration.  */
+   little and extended to handle '%pA', '%pB' and positional parameters.  */
 
 #define PRINT_TYPE(TYPE, FIELD) \
   do                                                           \
@@ -800,21 +797,6 @@ _bfd_doprnt (FILE *stream, const char *format, union _bfd_doprnt_args *args)
                  PRINT_TYPE (int, i);
                else
                  {
-                   /* L modifier for bfd_vma or bfd_size_type may be
-                      either long long or long.  */
-                   if (ptr[-2] == 'L')
-                     {
-                       sptr[-2] = 'l';
-                       if (BFD_ARCH_SIZE < 64 || BFD_HOST_64BIT_LONG)
-                         wide_width = 1;
-                       else
-                         {
-                           sptr[-1] = 'l';
-                           *sptr++ = ptr[-1];
-                           *sptr = '\0';
-                         }
-                     }
-
                    switch (wide_width)
                      {
                      case 0:
@@ -1051,12 +1033,6 @@ _bfd_doprnt_scan (const char *format, union _bfd_doprnt_args *args)
                  arg_type = Int;
                else
                  {
-                   if (ptr[-2] == 'L')
-                     {
-                       if (BFD_ARCH_SIZE < 64 || BFD_HOST_64BIT_LONG)
-                         wide_width = 1;
-                     }
-
                    switch (wide_width)
                      {
                      case 0:
index c81b4337f065dc1eb9a1dadd436ab80785a4b0ed..50c62caa3998e5dd743e286402391a168f5ebc65 100644 (file)
@@ -1748,8 +1748,8 @@ coff_arm_relocate_section (bfd *output_bfd,
        case bfd_reloc_outofrange:
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: bad reloc address %#Lx in section `%pA'"),
-            input_bfd, rel->r_vaddr, input_section);
+           (_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"),
+            input_bfd, (uint64_t) rel->r_vaddr, input_section);
          return FALSE;
        case bfd_reloc_overflow:
          {
index 5e3b7d4c791a37425138739dd03a41501fbec8ab..fccd4ade5e7e6cfcc1febcfa36d34ad77e3e2171 100644 (file)
@@ -479,9 +479,10 @@ coff_mcore_relocate_section (bfd * output_bfd,
          _bfd_error_handler
            /* xgettext: c-format */
            (_("Warning: unsupported reloc %s <file %pB, section %pA>\n"
-              "sym %ld (%s), r_vaddr %Ld (%#Lx)"),
+              "sym %ld (%s), r_vaddr %" PRId64 " (%#" PRIx64 ")"),
             howto->name, input_bfd, input_section,
-            rel->r_symndx, my_name, rel->r_vaddr, rel->r_vaddr);
+            rel->r_symndx, my_name, (int64_t) rel->r_vaddr,
+            (uint64_t) rel->r_vaddr);
          break;
 
        case IMAGE_REL_MCORE_PCREL_IMM8BY4:
index 8cdfd80343b0c7072dc4eef0b83f839f3b0dc94f..a27b8b66c7bc76ccd6d4655e90fe1754597f0b16 100644 (file)
@@ -1131,9 +1131,9 @@ coff_ppc_relocate_section (bfd *output_bfd,
                      {
                        _bfd_error_handler
                          /* xgettext: c-format */
-                         (_("%pB: Relocation for %s of %#Lx exceeds "
+                         (_("%pB: Relocation for %s of %#" PRIx64 " exceeds "
                             "Toc size limit"),
-                          input_bfd, name, our_toc_offset);
+                          input_bfd, name, (uint64_t) our_toc_offset);
                        bfd_set_error (bfd_error_bad_value);
                        return FALSE;
                      }
@@ -1185,8 +1185,8 @@ coff_ppc_relocate_section (bfd *output_bfd,
              {
                _bfd_error_handler
                  /* xgettext: c-format */
-                 (_("%pB: Relocation exceeds allocated TOC (%#Lx)"),
-                  input_bfd, toc_section->size);
+                 (_("%pB: Relocation exceeds allocated TOC (%#" PRIx64 ")"),
+                  input_bfd, (uint64_t) toc_section->size);
                bfd_set_error (bfd_error_bad_value);
                return FALSE;
              }
@@ -1241,9 +1241,10 @@ coff_ppc_relocate_section (bfd *output_bfd,
            _bfd_error_handler
              /* xgettext: c-format */
              (_("Warning: unsupported reloc %s <file %pB, section %pA>\n"
-                "sym %ld (%s), r_vaddr %Ld (%#Lx)"),
+                "sym %ld (%s), r_vaddr %" PRId64 " (%#" PRIx64 ")"),
               howto->name, input_bfd, input_section,
-              rel->r_symndx, my_name, rel->r_vaddr, rel->r_vaddr);
+              rel->r_symndx, my_name,
+              (int64_t) rel->r_vaddr, (uint64_t) rel->r_vaddr);
          }
          break;
        case IMAGE_REL_PPC_IMGLUE:
index a28e935ec60230a677079c501a3d29f2991c2bc1..d1253df57a2f2f18944d3898c76384499dab4690 100644 (file)
@@ -2856,8 +2856,8 @@ xcoff_reloc_type_toc (bfd *input_bfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: TOC reloc at %#Lx to symbol `%s' with no TOC entry"),
-            input_bfd, rel->r_vaddr, h->root.root.string);
+           (_("%pB: TOC reloc at %#" PRIx64 " to symbol `%s' with no TOC entry"),
+            input_bfd, (uint64_t) rel->r_vaddr, h->root.root.string);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
index a7a0ec30b98e2ef4c6b33675763b4e5d1efaf388..c4ad234fde06efa6b820ce61ee8655c033040022 100644 (file)
@@ -775,8 +775,9 @@ sh_relax_section (bfd *abfd,
       if (laddr >= sec->size)
        {
          /* xgettext: c-format */
-         _bfd_error_handler (_("%pB: %#Lx: warning: bad R_SH_USES offset"),
-                             abfd, irel->r_vaddr);
+         _bfd_error_handler
+           (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES offset"),
+            abfd, (uint64_t) irel->r_vaddr);
          continue;
        }
       insn = bfd_get_16 (abfd, contents + laddr);
@@ -786,8 +787,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: %#Lx: warning: R_SH_USES points to unrecognized insn %#x"),
-            abfd, irel->r_vaddr, insn);
+           (_("%pB: %#" PRIx64 ": warning: R_SH_USES points to unrecognized insn %#x"),
+            abfd, (uint64_t) irel->r_vaddr, insn);
          continue;
        }
 
@@ -804,8 +805,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: %#Lx: warning: bad R_SH_USES load offset"),
-            abfd, irel->r_vaddr);
+           (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES load offset"),
+            abfd, (uint64_t) irel->r_vaddr);
          continue;
        }
 
@@ -829,8 +830,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: %#Lx: warning: could not find expected reloc"),
-            abfd, paddr);
+           (_("%pB: %#" PRIx64 ": warning: could not find expected reloc"),
+            abfd, (uint64_t) paddr);
          continue;
        }
 
@@ -846,8 +847,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: %#Lx: warning: symbol in unexpected section"),
-            abfd, paddr);
+           (_("%pB: %#" PRIx64 ": warning: symbol in unexpected section"),
+            abfd, (uint64_t) paddr);
          continue;
        }
 
@@ -972,8 +973,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: %#Lx: warning: could not find expected COUNT reloc"),
-            abfd, paddr);
+           (_("%pB: %#" PRIx64 ": warning: could not find expected COUNT reloc"),
+            abfd, (uint64_t) paddr);
          continue;
        }
 
@@ -982,8 +983,8 @@ sh_relax_section (bfd *abfd,
       if (irelcount->r_offset == 0)
        {
          /* xgettext: c-format */
-         _bfd_error_handler (_("%pB: %#Lx: warning: bad count"),
-                             abfd, paddr);
+         _bfd_error_handler (_("%pB: %#" PRIx64 ": warning: bad count"),
+                             abfd, (uint64_t) paddr);
          continue;
        }
 
@@ -1354,8 +1355,8 @@ sh_relax_delete_bytes (bfd *abfd,
            {
              _bfd_error_handler
                /* xgettext: c-format */
-               (_("%pB: %#Lx: fatal: reloc overflow while relaxing"),
-                abfd, irel->r_vaddr);
+               (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+                abfd, (uint64_t) irel->r_vaddr);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -2642,8 +2643,8 @@ sh_swap_insns (bfd *      abfd,
            {
              _bfd_error_handler
                /* xgettext: c-format */
-               (_("%pB: %#Lx: fatal: reloc overflow while relaxing"),
-                abfd, irel->r_vaddr);
+               (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+                abfd, (uint64_t) irel->r_vaddr);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
index 292053178494c767c31f00c8d36fe3154207ae97..dda34fac20efb25c593569b16f7a25117859ed78 100644 (file)
@@ -669,8 +669,8 @@ coff_tic80_relocate_section (bfd *output_bfd,
        case bfd_reloc_outofrange:
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: bad reloc address %#Lx in section `%pA'"),
-            input_bfd, rel->r_vaddr, input_section);
+           (_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"),
+            input_bfd, (uint64_t) rel->r_vaddr, input_section);
          return FALSE;
        case bfd_reloc_overflow:
          {
index f3d061b7a4a4adf06998fa43ef1d6d27f35b8a13..0cb1fc8b4f678ff0ffd1a92771c5285546340bf4 100644 (file)
@@ -5380,8 +5380,8 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: illegal relocation type %d at address %#Lx"),
-            abfd, dst.r_type, dst.r_vaddr);
+           (_("%pB: illegal relocation type %d at address %#" PRIx64),
+            abfd, dst.r_type, (uint64_t) dst.r_vaddr);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
index 7f2d18107ba22d94e42de144897b4ca15c9001d7..3d32968022e90f6d3cc1c6839f5706253789b1be 100644 (file)
@@ -1647,8 +1647,8 @@ _bfd_coff_get_external_symbols (bfd *abfd)
          && size > bfd_get_file_size (abfd)))
 
     {
-      _bfd_error_handler (_("%pB: corrupt symbol count: %#Lx"),
-                         abfd, obj_raw_syment_count (abfd));
+      _bfd_error_handler (_("%pB: corrupt symbol count: %#" PRIx64 ""),
+                         abfd, (uint64_t) obj_raw_syment_count (abfd));
       return FALSE;
     }
 
@@ -1656,8 +1656,10 @@ _bfd_coff_get_external_symbols (bfd *abfd)
   if (syms == NULL)
     {
       /* PR 21013: Provide an error message when the alloc fails.  */
-      _bfd_error_handler (_("%pB: not enough memory to allocate space for %#Lx symbols of size %#Lx"),
-                         abfd, obj_raw_syment_count (abfd), symesz);
+      _bfd_error_handler (_("%pB: not enough memory to allocate space "
+                           "for %#" PRIx64 " symbols of size %#" PRIx64),
+                         abfd, (uint64_t) obj_raw_syment_count (abfd),
+                         (uint64_t) symesz);
       return FALSE;
     }
 
@@ -1723,7 +1725,7 @@ _bfd_coff_read_string_table (bfd *abfd)
     {
       _bfd_error_handler
        /* xgettext: c-format */
-       (_("%pB: bad string table size %Lu"), abfd, strsize);
+       (_("%pB: bad string table size %" PRIu64), abfd, (uint64_t) strsize);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
index 2b2a8d6f3062d105693dbe52da62281dfb4215aa..ce41dde9715179089d86aa1c28566e993251e2af 100644 (file)
@@ -3124,8 +3124,8 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
        case bfd_reloc_outofrange:
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%pB: bad reloc address %#Lx in section `%pA'"),
-            input_bfd, rel->r_vaddr, input_section);
+           (_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"),
+            input_bfd, (uint64_t) rel->r_vaddr, input_section);
          return FALSE;
        case bfd_reloc_overflow:
          {
index 6a3aabb6b4aec52387220552b11d99159382f4b2..53e566e498e13b29b8c6095e230efee145d6e12b 100644 (file)
@@ -252,8 +252,8 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
              if (bfd_get_error () == bfd_error_no_memory)
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("error: %pB(%pA) is too large (%#Lx bytes)"),
-                 abfd, sec, sz);
+                 (_("error: %pB(%pA) is too large (%#" PRIx64 " bytes)"),
+                 abfd, sec, (uint64_t) sz);
              return FALSE;
            }
        }
index c027542e50d798b799ff4a1beb14781c5d6b03b2..f9561885dcba72a109359c983a12d023160093c4 100644 (file)
@@ -570,8 +570,9 @@ read_section (bfd *       abfd,
     {
       /* xgettext: c-format */
       _bfd_error_handler (_("Dwarf Error: Offset (%llu)"
-                           " greater than or equal to %s size (%Lu)."),
-                         (long long) offset, section_name, *section_size);
+                           " greater than or equal to %s size (%" PRIu64 ")."),
+                         (long long) offset, section_name,
+                         (uint64_t) *section_size);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -1918,8 +1919,9 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp,
      if we know that we are going to run out of buffer.  */
   if (data_count > (bfd_vma) (buf_end - buf))
     {
-      _bfd_error_handler (_("Dwarf Error: data count (%Lx) larger than buffer size."),
-                         data_count);
+      _bfd_error_handler
+       (_("Dwarf Error: data count (%" PRIx64 ") larger than buffer size."),
+        (uint64_t) data_count);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -1959,8 +1961,8 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp,
              break;
            default:
              _bfd_error_handler
-               (_("Dwarf Error: Unknown format content type %Lu."),
-                content_type);
+               (_("Dwarf Error: Unknown format content type %" PRIu64 "."),
+                (uint64_t) content_type);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -2039,8 +2041,8 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
   if (stash->dwarf_line_size < 16)
     {
       _bfd_error_handler
-       (_("Dwarf Error: Line info section is too small (%Ld)"),
-        stash->dwarf_line_size);
+       (_("Dwarf Error: Line info section is too small (%" PRId64 ")"),
+        (int64_t) stash->dwarf_line_size);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
@@ -2069,9 +2071,9 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
     {
       _bfd_error_handler
        /* xgettext: c-format */
-       (_("Dwarf Error: Line info data is bigger (%#Lx)"
+       (_("Dwarf Error: Line info data is bigger (%#" PRIx64 ")"
           " than the space remaining in the section (%#lx)"),
-        lh.total_length, (unsigned long) (line_end - line_ptr));
+        (uint64_t) lh.total_length, (unsigned long) (line_end - line_ptr));
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
index efb000363eb489a62779d5c89c5bb22cd6cae7f1..795944eb33d35948b865868b4f9f13bd780ca632 100644 (file)
@@ -2090,10 +2090,11 @@ mn10300_elf_relocate_section (bfd *output_bfd,
 
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+             (_("%pB(%pA+%#" PRIx64 "): "
+                "unresolvable %s relocation against symbol `%s'"),
               input_bfd,
               input_section,
-              rel->r_offset,
+              (uint64_t) rel->r_offset,
               howto->name,
               h->root.root.root.string);
        }
index 489e5e2b575204ba524049308fc6c0f48a4de53f..2fb83772740a45763d5baba6fbe03b2f8e37d4ee 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -355,8 +355,8 @@ bfd_elf_string_from_elf_section (bfd *abfd,
       unsigned int shstrndx = elf_elfheader(abfd)->e_shstrndx;
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%pB: invalid string offset %u >= %Lu for section `%s'"),
-        abfd, strindex, hdr->sh_size,
+       (_("%pB: invalid string offset %u >= %" PRIu64 " for section `%s'"),
+        abfd, strindex, (uint64_t) hdr->sh_size,
         (shindex == shstrndx && strindex == hdr->sh_name
          ? ".shstrtab"
          : bfd_elf_string_from_elf_section (abfd, shstrndx, hdr->sh_name)));
@@ -659,7 +659,8 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
                      _bfd_error_handler
                        /* xgettext:c-format */
                        (_("%pB: corrupt size field in group section"
-                          " header: %#Lx"), abfd, shdr->sh_size);
+                          " header: %#" PRIx64),
+                        abfd, (uint64_t) shdr->sh_size);
                      bfd_set_error (bfd_error_bad_value);
                      -- num_group;
                      continue;
@@ -674,7 +675,8 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
                      _bfd_error_handler
                        /* xgettext:c-format */
                        (_("%pB: invalid size field in group section"
-                          " header: %#Lx"), abfd, shdr->sh_size);
+                          " header: %#" PRIx64 ""),
+                        abfd, (uint64_t) shdr->sh_size);
                      bfd_set_error (bfd_error_bad_value);
                      -- num_group;
                      /* PR 17510: If the group contents are even
@@ -5558,8 +5560,8 @@ assign_file_positions_for_load_sections (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: section %pA lma %#Lx adjusted to %#Lx"),
-                    abfd, sec, s_start, p_end);
+                   (_("%pB: section %pA lma %#" PRIx64 " adjusted to %#" PRIx64),
+                    abfd, sec, (uint64_t) s_start, (uint64_t) p_end);
                  adjust = 0;
                  sec->lma = p_end;
                }
@@ -6836,8 +6838,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
              && (segment->p_filesz > 0 || segment->p_memsz == 0))
            /* xgettext:c-format */
            _bfd_error_handler (_("%pB: warning: Empty loadable segment detected"
-                                 " at vaddr=%#Lx, is this intentional?"),
-                               ibfd, segment->p_vaddr);
+                                 " at vaddr=%#" PRIx64 ", is this intentional?"),
+                               ibfd, (uint64_t) segment->p_vaddr);
 
          map->count = 0;
          *pointer_to_map = map;
@@ -7449,9 +7451,9 @@ rewrite:
            /* PR 17512: file: f17299af.  */
            if (segment->p_align > (bfd_vma) 1 << ((sizeof (bfd_vma) * 8) - 2))
              /* xgettext:c-format */
-             _bfd_error_handler (_("%pB: warning: segment alignment of %#Lx"
-                                   " is too large"),
-                                 ibfd, segment->p_align);
+             _bfd_error_handler (_("%pB: warning: segment alignment of %#"
+                                   PRIx64 " is too large"),
+                                 ibfd, (uint64_t) segment->p_align);
            else
              maxpagesize = segment->p_align;
          }
index 86fa391820272e9d1583b3b2cd68eb7a569261f0..f6c6a8c4ed64afec8e755be823de35588a034c40 100644 (file)
@@ -1125,26 +1125,26 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
          if (reloc_data.reloc_addend == 0)
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): CMEM relocation to `%s' is invalid, "
-                "16 MSB should be %#x (value is %#Lx)"),
+             (_("%pB(%pA+%#" PRIx64 "): CMEM relocation to `%s' is invalid, "
+                "16 MSB should be %#x (value is %#" PRIx64 ")"),
               reloc_data.input_section->owner,
               reloc_data.input_section,
-              reloc_data.reloc_offset,
+              (uint64_t) reloc_data.reloc_offset,
               reloc_data.symbol_name,
               NPS_CMEM_HIGH_VALUE,
-              relocation);
+              (uint64_t) relocation);
          else
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): CMEM relocation to `%s+%#Lx' is invalid, "
-                "16 MSB should be %#x (value is %#Lx)"),
+             (_("%pB(%pA+%#" PRIx64 "): CMEM relocation to `%s+%#" PRIx64
+                "' is invalid, 16 MSB should be %#x (value is %#" PRIx64 ")"),
               reloc_data.input_section->owner,
               reloc_data.input_section,
-              reloc_data.reloc_offset,
+              (uint64_t) reloc_data.reloc_offset,
               reloc_data.symbol_name,
-              reloc_data.reloc_addend,
+              (uint64_t) reloc_data.reloc_addend,
               NPS_CMEM_HIGH_VALUE,
-              relocation);
+              (uint64_t) relocation);
          return bfd_reloc_overflow;
        }
       break;
index 6109dab938e78298bd214d3e13ee1a83896b3bf9..b599b1e65cbf7bcec9ab7844321f84411236980b 100644 (file)
@@ -9720,8 +9720,9 @@ elf32_arm_tls_relax (struct elf32_arm_link_hash_table *globals,
              | bfd_get_16 (input_bfd, contents + rel->r_offset + 2);
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unexpected Thumb instruction '%#lx' in TLS trampoline"),
-            input_bfd, input_sec, rel->r_offset, insn);
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unexpected Thumb instruction '%#lx' in TLS trampoline"),
+            input_bfd, input_sec, (uint64_t) rel->r_offset, insn);
          return bfd_reloc_notsupported;
        }
       break;
@@ -9760,8 +9761,9 @@ elf32_arm_tls_relax (struct elf32_arm_link_hash_table *globals,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unexpected ARM instruction '%#lx' in TLS trampoline"),
-            input_bfd, input_sec, rel->r_offset, insn);
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unexpected ARM instruction '%#lx' in TLS trampoline"),
+            input_bfd, input_sec, (uint64_t) rel->r_offset, insn);
          return bfd_reloc_notsupported;
        }
       break;
@@ -11531,8 +11533,11 @@ elf32_arm_final_link_relocate (reloc_howto_type *          howto,
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB(%pA+%#Lx): unexpected Thumb instruction '%#lx' referenced by TLS_GOTDESC"),
-                      input_bfd, input_section, rel->r_offset, insn);
+                     (_("%pB(%pA+%#" PRIx64 "): "
+                        "unexpected Thumb instruction '%#lx' "
+                        "referenced by TLS_GOTDESC"),
+                      input_bfd, input_section, (uint64_t) rel->r_offset,
+                      insn);
                    return bfd_reloc_notsupported;
                  }
              }
@@ -11554,8 +11559,11 @@ elf32_arm_final_link_relocate (reloc_howto_type *          howto,
                  default:
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB(%pA+%#Lx): unexpected ARM instruction '%#lx' referenced by TLS_GOTDESC"),
-                      input_bfd, input_section, rel->r_offset, insn);
+                     (_("%pB(%pA+%#" PRIx64 "): "
+                        "unexpected ARM instruction '%#lx' "
+                        "referenced by TLS_GOTDESC"),
+                      input_bfd, input_section, (uint64_t) rel->r_offset,
+                      insn);
                    return bfd_reloc_notsupported;
                  }
              }
@@ -11583,8 +11591,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): %s relocation not permitted in shared object"),
-            input_bfd, input_section, rel->r_offset, howto->name);
+           (_("%pB(%pA+%#" PRIx64 "): %s relocation not permitted "
+              "in shared object"),
+            input_bfd, input_section, (uint64_t) rel->r_offset, howto->name);
          return bfd_reloc_notsupported;
        }
       else
@@ -11796,8 +11805,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
              {
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%pB(%pA+%#Lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
-                 input_bfd, input_section, rel->r_offset);
+                 (_("%pB(%pA+%#" PRIx64 "): Only ADD or SUB instructions "
+                    "are allowed for ALU group relocations"),
+                 input_bfd, input_section, (uint64_t) rel->r_offset);
                return bfd_reloc_overflow;
              }
 
@@ -11836,9 +11846,11 @@ elf32_arm_final_link_relocate (reloc_howto_type *          howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
-              input_bfd, input_section, rel->r_offset,
-              signed_value < 0 ? -signed_value : signed_value, howto->name);
+             (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+                "splitting %#" PRIx64 " for group relocation %s"),
+              input_bfd, input_section, (uint64_t) rel->r_offset,
+              (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+              howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -11926,9 +11938,11 @@ elf32_arm_final_link_relocate (reloc_howto_type *          howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
-              input_bfd, input_section, rel->r_offset,
-              signed_value < 0 ? -signed_value : signed_value, howto->name);
+             (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+                "splitting %#" PRIx64 " for group relocation %s"),
+              input_bfd, input_section, (uint64_t) rel->r_offset,
+              (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+              howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -12012,9 +12026,11 @@ elf32_arm_final_link_relocate (reloc_howto_type *          howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
-              input_bfd, input_section, rel->r_offset,
-              signed_value < 0 ? -signed_value : signed_value, howto->name);
+             (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+                "splitting %#" PRIx64 " for group relocation %s"),
+              input_bfd, input_section, (uint64_t) rel->r_offset,
+              (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+              howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -12100,9 +12116,11 @@ elf32_arm_final_link_relocate (reloc_howto_type *          howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
-              input_bfd, input_section, rel->r_offset,
-              signed_value < 0 ? -signed_value : signed_value, howto->name);
+             (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+                "splitting %#" PRIx64 " for group relocation %s"),
+              input_bfd, input_section, (uint64_t) rel->r_offset,
+              (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+              howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -12366,9 +12384,10 @@ elf32_arm_relocate_section (bfd *                 output_bfd,
                        {
                          _bfd_error_handler
                            /* xgettext:c-format */
-                           (_("%pB(%pA+%#Lx): %s relocation against SEC_MERGE section"),
+                           (_("%pB(%pA+%#" PRIx64 "): "
+                              "%s relocation against SEC_MERGE section"),
                             input_bfd, input_section,
-                            rel->r_offset, howto->name);
+                            (uint64_t) rel->r_offset, howto->name);
                          return FALSE;
                        }
 
@@ -12478,12 +12497,12 @@ elf32_arm_relocate_section (bfd *                output_bfd,
          _bfd_error_handler
            ((sym_type == STT_TLS
              /* xgettext:c-format */
-             ? _("%pB(%pA+%#Lx): %s used with TLS symbol %s")
+             ? _("%pB(%pA+%#" PRIx64 "): %s used with TLS symbol %s")
              /* xgettext:c-format */
-             : _("%pB(%pA+%#Lx): %s used with non-TLS symbol %s")),
+             : _("%pB(%pA+%#" PRIx64 "): %s used with non-TLS symbol %s")),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             name);
        }
@@ -12533,10 +12552,11 @@ elf32_arm_relocate_section (bfd *                output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -18418,12 +18438,13 @@ elf32_arm_write_section (bfd *output_bfd,
                      branch_to_veneer - (1 << 24) : 0;
 
                    _bfd_error_handler
-                     (_("%pB(%#Lx): error: Cannot create STM32L4XX veneer. "
-                        "Jump out of range by %Ld bytes. "
+                     (_("%pB(%#" PRIx64 "): error: "
+                        "Cannot create STM32L4XX veneer. "
+                        "Jump out of range by %" PRId64 " bytes. "
                         "Cannot encode branch instruction. "),
                       output_bfd,
-                      stm32l4xx_errnode->vma - 4,
-                      out_of_range);
+                      (uint64_t) (stm32l4xx_errnode->vma - 4),
+                      (int64_t) out_of_range);
                    continue;
                  }
 
index afd316b9802bbaefeb42526cf47423d1c882813f..6964e076601df54050c1f4e86c7170cf00f319a8 100644 (file)
@@ -1574,9 +1574,10 @@ bfin_relocate_section (bfd * output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unresolvable relocation against symbol `%s'"),
-            input_bfd,
-            input_section, rel->r_offset, h->root.root.string);
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unresolvable relocation against symbol `%s'"),
+            input_bfd, input_section, (uint64_t) rel->r_offset,
+            h->root.root.string);
          return FALSE;
        }
 
@@ -1605,8 +1606,9 @@ bfin_relocate_section (bfd * output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): reloc against `%s': error %d"),
-                input_bfd, input_section, rel->r_offset, name, (int) r);
+               (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"),
+                input_bfd, input_section, (uint64_t) rel->r_offset,
+                name, (int) r);
              return FALSE;
            }
        }
@@ -2625,8 +2627,9 @@ bfinfdpic_relocate_section (bfd * output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: relocation at `%pA+%#Lx' references symbol `%s' with nonzero addend"),
-                input_bfd, input_section, rel->r_offset, name);
+               (_("%pB: relocation at `%pA+%#" PRIx64 "' "
+                  "references symbol `%s' with nonzero addend"),
+                input_bfd, input_section, (uint64_t) rel->r_offset, name);
              return FALSE;
 
            }
index 1408d804bec0aa9986c22a41e0d39bf46918388e..31c06d34ac5a32b94e8f1cbdb290f4c4da90283f 100644 (file)
@@ -1305,21 +1305,21 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                if (h == NULL)
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB, section %pA: relocation %s with non-zero addend %Ld"
-                      " against local symbol"),
+                   (_("%pB, section %pA: relocation %s with non-zero addend"
+                      " %" PRId64 " against local symbol"),
                     input_bfd,
                     input_section,
                     cris_elf_howto_table[r_type].name,
-                    rel->r_addend);
+                    (int64_t) rel->r_addend);
                else
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB, section %pA: relocation %s with non-zero addend %Ld"
-                      " against symbol `%s'"),
+                   (_("%pB, section %pA: relocation %s with non-zero addend"
+                      " %" PRId64 " against symbol `%s'"),
                     input_bfd,
                     input_section,
                     cris_elf_howto_table[r_type].name,
-                    rel->r_addend,
+                    (int64_t) rel->r_addend,
                     symname[0] != '\0' ? symname : _("[whose name is lost]"));
 
                bfd_set_error (bfd_error_bad_value);
@@ -1662,12 +1662,12 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                 to pass us these kinds of things.  */
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB, section %pA: relocation %s with non-zero addend %Ld"
-                  " against symbol `%s'"),
+               (_("%pB, section %pA: relocation %s with non-zero addend"
+                  " %" PRId64 " against symbol `%s'"),
                 input_bfd,
                 input_section,
                 cris_elf_howto_table[r_type].name,
-                rel->r_addend,
+                (int64_t) rel->r_addend,
                 symname[0] != '\0' ? symname : _("[whose name is lost]"));
 
              bfd_set_error (bfd_error_bad_value);
@@ -1815,12 +1815,12 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                 things.  */
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB, section %pA: relocation %s with non-zero addend %Ld"
-                  " against symbol `%s'"),
+               (_("%pB, section %pA: relocation %s with non-zero addend"
+                  " %" PRId64 " against symbol `%s'"),
                 input_bfd,
                 input_section,
                 cris_elf_howto_table[r_type].name,
-                rel->r_addend,
+                (int64_t) rel->r_addend,
                 symname[0] != '\0' ? symname : _("[whose name is lost]"));
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
index f4f1297eb7956a4783dd720116ad93f070882060..3ce38078b8d6f8ebce3b490b375a0108d0d5383d 100644 (file)
@@ -826,10 +826,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): cannot reach %s, recompile with -ffunction-sections"),
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "cannot reach %s, recompile with -ffunction-sections"),
             hsh->target_section->owner,
             stub_sec,
-            hsh->stub_offset,
+            (uint64_t) hsh->stub_offset,
             hsh->bh_root.string);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -3330,10 +3331,11 @@ final_link_relocate (asection *input_section,
                   error.  */
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%pB(%pA+%#Lx): %s fixup for insn %#x is not supported in a non-shared link"),
+                 (_("%pB(%pA+%#" PRIx64 "): %s fixup for insn %#x "
+                    "is not supported in a non-shared link"),
                   input_bfd,
                   input_section,
-                  offset,
+                  (uint64_t) offset,
                   howto->name,
                   insn);
            }
@@ -3496,10 +3498,11 @@ final_link_relocate (asection *input_section,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%pB(%pA+%#Lx): cannot reach %s, recompile with -ffunction-sections"),
+       (_("%pB(%pA+%#" PRIx64 "): cannot reach %s, "
+          "recompile with -ffunction-sections"),
         input_bfd,
         input_section,
-        offset,
+        (uint64_t) offset,
         hsh->bh_root.string);
       bfd_set_error (bfd_error_bad_value);
       return bfd_reloc_notsupported;
@@ -4198,10 +4201,10 @@ elf32_hppa_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): cannot handle %s for %s"),
+               (_("%pB(%pA+%#" PRIx64 "): cannot handle %s for %s"),
                 input_bfd,
                 input_section,
-                rela->r_offset,
+                (uint64_t) rela->r_offset,
                 howto->name,
                 sym_name);
              bfd_set_error (bfd_error_bad_value);
index a6ea113f0d8ecf8151a173ddafc6c329eff0dc3b..09067859a8dacbddb99f761f279b25ca05831743 100644 (file)
@@ -1156,10 +1156,10 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd,
 
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%pB: TLS transition from %s to %s against `%s' at %#Lx "
-          "in section `%pA' failed"),
+       (_("%pB: TLS transition from %s to %s against `%s'"
+          " at %#" PRIx64 " in section `%pA' failed"),
         abfd, from->name, to->name, name,
-        rel->r_offset, sec);
+        (uint64_t) rel->r_offset, sec);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -3442,10 +3442,10 @@ disallow_got32:
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%pA+%#" PRIx64 "): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -3482,9 +3482,9 @@ check_relocation_error:
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): reloc against `%s': error %d"),
+               (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                rel->r_offset, name, (int) r);
+                (uint64_t) rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index 66b1351a1947ad82e4488735a7867539c910924d..361f3203272b6ff8d05eb326ed83117427aaa874 100644 (file)
@@ -1295,9 +1295,11 @@ ip2k_final_link_relocate (reloc_howto_type *  howto,
              ip2k_nominal_page_bits (input_bfd, input_section,
                                      rel->r_offset, contents))
            /* xgettext:c-format */
-           _bfd_error_handler (_("ip2k linker: missing page instruction at %#Lx (dest = %#Lx)"),
-                               BASEADDR (input_section) + rel->r_offset,
-                               relocation + rel->r_addend);
+           _bfd_error_handler
+             (_("ip2k linker: missing page instruction "
+                "at %#" PRIx64 " (dest = %#" PRIx64 ")"),
+              (uint64_t) (BASEADDR (input_section) + rel->r_offset),
+              (uint64_t) (relocation + rel->r_addend));
        }
       else if (ip2k_relaxed)
        {
@@ -1312,9 +1314,11 @@ ip2k_final_link_relocate (reloc_howto_type *  howto,
                  ip2k_nominal_page_bits (input_bfd, input_section,
                                          rel->r_offset - 2, contents)))
            /* xgettext:c-format */
-           _bfd_error_handler (_("ip2k linker: redundant page instruction at %#Lx (dest = %#Lx)"),
-                               page_addr,
-                               relocation + rel->r_addend);
+           _bfd_error_handler
+             (_("ip2k linker: redundant page instruction "
+                "at %#" PRIx64 " (dest = %#" PRIx64 ")"),
+              (uint64_t) page_addr,
+              (uint64_t) (relocation + rel->r_addend));
        }
       if ((relocation & IP2K_INSN_MASK) == IP2K_INSN_VALUE)
        relocation &= ~IP2K_INSN_MASK;
index 6269775e14f61341e8a44d6a4b17edd2f40bcab8..23b88729bf839c9a49444787e529c8fefd513987 100644 (file)
@@ -1427,8 +1427,9 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd,
              != (lm32fdpic_fixup32_section (info)->reloc_count * 4))
        {
          _bfd_error_handler
-           ("LINKER BUG: .rofixup section size mismatch: size/4 %Ld != relocs %d",
-           lm32fdpic_fixup32_section (info)->size/4,
+           ("LINKER BUG: .rofixup section size mismatch: size/4 %" PRId64
+            " != relocs %d",
+           (int64_t) (lm32fdpic_fixup32_section (info)->size / 4),
            lm32fdpic_fixup32_section (info)->reloc_count);
          return FALSE;
        }
@@ -1449,7 +1450,9 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd,
          if (hend->u.def.value != value)
            {
              _bfd_error_handler
-               ("LINKER BUG: .rofixup section hend->u.def.value != value: %Ld != %Ld", hend->u.def.value, value);
+               ("LINKER BUG: .rofixup section hend->u.def.value != value: %"
+                PRId64 " != %" PRId64,
+                (int64_t) hend->u.def.value, (int64_t) value);
              return FALSE;
            }
        }
index 985047e47f8f9adaeb24efe1840a58ac811a2d15..2801f0443acce9f3b53c99b52207199f5135bbcc 100644 (file)
@@ -2523,11 +2523,11 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB(%pA+%#Lx): unresolvable %s relocation "
+                   (_("%pB(%pA+%#" PRIx64 "): unresolvable %s relocation "
                       "against symbol `%s'"),
                     input_bfd,
                     input_section,
-                    rel->r_offset,
+                    (uint64_t) rel->r_offset,
                     howto->name,
                     h->root.root.string);
                }
index d7f5d5f3a7732d10b709f891d96e1e0fa6d1bb9e..3414d28526bbfdc863c08274e8ebe2a20b449fe0 100644 (file)
@@ -3698,8 +3698,10 @@ elf_m68k_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): %s relocation not permitted in shared object"),
-                input_bfd, input_section, rel->r_offset, howto->name);
+               (_("%pB(%pA+%#" PRIx64 "): "
+                  "%s relocation not permitted in shared object"),
+                input_bfd, input_section, (uint64_t) rel->r_offset,
+                howto->name);
 
              return FALSE;
            }
@@ -3892,10 +3894,11 @@ elf_m68k_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -3928,12 +3931,12 @@ elf_m68k_relocate_section (bfd *output_bfd,
              _bfd_error_handler
                ((sym_type == STT_TLS
                  /* xgettext:c-format */
-                 ? _("%pB(%pA+%#Lx): %s used with TLS symbol %s")
+                 ? _("%pB(%pA+%#" PRIx64 "): %s used with TLS symbol %s")
                  /* xgettext:c-format */
-                 : _("%pB(%pA+%#Lx): %s used with non-TLS symbol %s")),
+                 : _("%pB(%pA+%#" PRIx64 "): %s used with non-TLS symbol %s")),
                 input_bfd,
                 input_section,
-                rel->r_offset,
+                (uint64_t) rel->r_offset,
                 howto->name,
                 name);
            }
@@ -3968,9 +3971,9 @@ elf_m68k_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): reloc against `%s': error %d"),
+               (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                rel->r_offset, name, (int) r);
+                (uint64_t) rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index dc867ce3f1059c1ce0e9ecff85905adc6b13200c..c09a2ea414eb7115b7efb14b87b83b76b0a58837 100644 (file)
@@ -1913,8 +1913,10 @@ elf_metag_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): %s relocation not permitted in shared object"),
-                input_bfd, input_section, rel->r_offset, howto->name);
+               (_("%pB(%pA+%#" PRIx64 "): "
+                  "%s relocation not permitted in shared object"),
+                input_bfd, input_section, (uint64_t) rel->r_offset,
+                howto->name);
              return FALSE;
            }
          else
index 70cf1dcc63e059e64ef1c536787d36224e0c4d0c..bd7c0f1972064affc6dc43340cccfc54f7dfbfdf 100644 (file)
@@ -8791,7 +8791,7 @@ relax_range_measurement (bfd *abfd)
 
 static const char * unrecognized_reloc_msg =
   /* xgettext:c-format */
-  N_("%pB: warning: %s points to unrecognized reloc at %#Lx");
+  N_("%pB: warning: %s points to unrecognized reloc at %#" PRIx64);
 
 /* Relax LONGCALL1 relocation for nds32_elf_relax_section.  */
 
@@ -8844,7 +8844,7 @@ nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL1",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -8925,7 +8925,7 @@ nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (i1_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL2",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9031,7 +9031,7 @@ nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL3",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9165,7 +9165,7 @@ nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP1",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9371,7 +9371,7 @@ nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (i2_irelfn == irelend || cond_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP2",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9563,7 +9563,7 @@ 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 (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP3",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9742,7 +9742,7 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9772,7 +9772,7 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (ptr_irel == irelend || em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
   /* Check these is enough space to insert jal in R_NDS32_EMPTY.  */
@@ -9843,7 +9843,7 @@ nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (cond_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL5",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9921,7 +9921,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL6",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -9959,7 +9959,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
       if (cond_irel == irelend)
        {
          _bfd_error_handler (unrecognized_reloc_msg, abfd,
-                             "R_NDS32_LONGCALL6", irel->r_offset);
+                             "R_NDS32_LONGCALL6", (uint64_t) irel->r_offset);
          return FALSE;
        }
       cond_irel->r_addend = 1;
@@ -10008,7 +10008,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
       if (cond_irel == irelend)
        {
          _bfd_error_handler (unrecognized_reloc_msg, abfd,
-                             "R_NDS32_LONGCALL6", irel->r_offset);
+                             "R_NDS32_LONGCALL6", (uint64_t) irel->r_offset);
          return FALSE;
        }
       cond_irel->r_addend = 1;
@@ -10058,7 +10058,7 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -10080,7 +10080,7 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (ptr_irel == irelend || em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -10154,7 +10154,7 @@ nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (cond_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP5",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -10283,7 +10283,7 @@ nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP6",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -10453,7 +10453,7 @@ nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (cond_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP7",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -10558,7 +10558,7 @@ nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd,
   if (hi_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LOADSTORE",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
        return FALSE;
     }
 
@@ -11032,7 +11032,7 @@ nds32_elf_relax_ptr (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (re_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_PTR",
-                         irel->r_offset);
+                         (uint64_t) irel->r_offset);
       return FALSE;
     }
 
@@ -15238,9 +15238,11 @@ nds32_elf_ex9_build_hash_table (bfd *abfd, asection *sec,
                          _bfd_error_handler
                            /* xgettext:c-format */
                            (_("%pB: warning: unaligned small data access "
-                              "for entry: {%Ld, %Ld, %Ld}, addr = %#Lx, align = %#x"),
-                            abfd, irel->r_offset,
-                            irel->r_info, irel->r_addend, relocation, align);
+                              "for entry: {%" PRId64 ", %" PRId64 ", %" PRId64
+                              "}, addr = %#" PRIx64 ", align = %#x"),
+                            abfd, (int64_t) irel->r_offset,
+                            (int64_t) irel->r_info, (int64_t) irel->r_addend,
+                            (uint64_t) relocation, align);
                          off += 4;
                          continue;
                        }
index b4849dbffe30f1665440c265aafd200ab088e1e0..450eeed86adf5344023d15fe2f39a41aae8b6023 100644 (file)
@@ -4355,10 +4355,10 @@ nios2_elf32_relocate_section (bfd *output_bfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB(%pA+%#Lx): %s relocation not "
+                   (_("%pB(%pA+%#" PRIx64 "): %s relocation not "
                       "permitted in shared object"),
                     input_bfd, input_section,
-                    rel->r_offset, howto->name);
+                    (uint64_t) rel->r_offset, howto->name);
                  return FALSE;
                }
              else
index c9db21c710a3eeb304ef7687fb69ca53e405611b..7d6196c0598e8e8b0383b8952141523299c5a3ba 100644 (file)
@@ -8161,8 +8161,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
              else
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%pB(%pA+%#Lx): error: %s with unexpected instruction %#x"),
-                  input_bfd, input_section, rel->r_offset,
+                 (_("%pB(%pA+%#" PRIx64 "): error: "
+                    "%s with unexpected instruction %#x"),
+                  input_bfd, input_section, (uint64_t) rel->r_offset,
                   "R_PPC_ADDR16_HA", insn);
            }
          else if (r_type == R_PPC_ADDR16_LO)
@@ -8196,8 +8197,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
              else
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%pB(%pA+%#Lx): error: %s with unexpected instruction %#x"),
-                  input_bfd, input_section, rel->r_offset,
+                 (_("%pB(%pA+%#" PRIx64 "): error: "
+                    "%s with unexpected instruction %#x"),
+                  input_bfd, input_section, (uint64_t) rel->r_offset,
                   "R_PPC_ADDR16_LO", insn);
            }
        }
index 93eb79c1d84d6d35c68ee1ec7cbe8036e6c95fc8..b393a50b0af1d80a4b1d118d72260a2a3e602f75 100644 (file)
@@ -684,9 +684,12 @@ rx_elf_relocate_section
          && strcmp (name, "__romdatastart") != 0                       \
          && !saw_subtract)                                             \
        /* xgettext:c-format */                                         \
-       _bfd_error_handler (_("%pB(%pA): unsafe PID relocation %s at %#Lx (against %s in %s)"), \
+       _bfd_error_handler (_("%pB(%pA): unsafe PID relocation %s "     \
+                             "at %#" PRIx64 " (against %s in %s)"),    \
                            input_bfd, input_section, howto->name,      \
-                           input_section->output_section->vma + input_section->output_offset + rel->r_offset, \
+                           (uint64_t) (input_section->output_section->vma \
+                                       + input_section->output_offset  \
+                                       + rel->r_offset),               \
                            name, sec->name);                           \
     }                                                                  \
   while (0)
index 3ddbd46901802667e813258f2f68cd188562ccb9..64bfb2d6e3d146d07f53cff7aba864979906d707 100644 (file)
@@ -2134,10 +2134,10 @@ invalid_tls_insn (bfd *input_bfd,
   howto = elf_howto_table + ELF32_R_TYPE (rel->r_info);
   _bfd_error_handler
     /* xgettext:c-format */
-    (_("%pB(%pA+%#Lx): invalid instruction for TLS relocation %s"),
+    (_("%pB(%pA+%#" PRIx64 "): invalid instruction for TLS relocation %s"),
      input_bfd,
      input_section,
-     rel->r_offset,
+     (uint64_t) rel->r_offset,
      howto->name);
   bfd_set_error (bfd_error_bad_value);
 }
@@ -3201,10 +3201,11 @@ elf_s390_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%pB(%pA+%#" PRIx64 "): "
+            "unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          rel->r_offset,
+          (uint64_t) rel->r_offset,
           howto->name,
           h->root.root.string);
 
@@ -3258,9 +3259,9 @@ elf_s390_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): reloc against `%s': error %d"),
+               (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                rel->r_offset, name, (int) r);
+                (uint64_t) rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index 383211578550888e28535d683e9783b9eebd67eb..66ae6450cf5cc42b69b1d86148e38b43f716d8cd 100644 (file)
@@ -2876,8 +2876,8 @@ s3_bfd_score_elf_check_relocs (bfd *abfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: CALL15 reloc at %#Lx not against global symbol"),
-                abfd, rel->r_offset);
+               (_("%pB: CALL15 reloc at %#" PRIx64 " not against global symbol"),
+                abfd, (uint64_t) rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
index ef42d7bdacb28bc4fb0a2695e3a580472479dc45..e3f795cdc7b6c76e807876e349199b6d08ebd679 100644 (file)
@@ -2681,8 +2681,8 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: CALL15 reloc at %#Lx not against global symbol"),
-                abfd, rel->r_offset);
+               (_("%pB: CALL15 reloc at %#" PRIx64 " not against global symbol"),
+                abfd, (uint64_t) rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
index 7c8ec6c684a0c87cc37e990eaaf188413a9836b6..5cb4acca9a86d8c96cc6f054e5394f7d357fcb4d 100644 (file)
@@ -577,8 +577,9 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
       if (laddr >= sec->size)
        {
          /* xgettext:c-format */
-         _bfd_error_handler (_("%pB: %#Lx: warning: bad R_SH_USES offset"),
-                             abfd, irel->r_offset);
+         _bfd_error_handler
+           (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES offset"),
+            abfd, (uint64_t) irel->r_offset);
          continue;
        }
       insn = bfd_get_16 (abfd, contents + laddr);
@@ -589,8 +590,9 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: %#Lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
-            abfd, irel->r_offset, insn);
+           (_("%pB: %#" PRIx64 ": warning: "
+              "R_SH_USES points to unrecognized insn 0x%x"),
+            abfd, (uint64_t) irel->r_offset, insn);
          continue;
        }
 
@@ -607,8 +609,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: %#Lx: warning: bad R_SH_USES load offset"),
-            abfd, irel->r_offset);
+           (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES load offset"),
+            abfd, (uint64_t) irel->r_offset);
          continue;
        }
 
@@ -623,8 +625,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: %#Lx: warning: could not find expected reloc"),
-            abfd, paddr);
+           (_("%pB: %#" PRIx64 ": warning: could not find expected reloc"),
+            abfd, (uint64_t) paddr);
          continue;
        }
 
@@ -652,8 +654,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: %#Lx: warning: symbol in unexpected section"),
-                abfd, paddr);
+               (_("%pB: %#" PRIx64 ": warning: symbol in unexpected section"),
+                abfd, (uint64_t) paddr);
              continue;
            }
 
@@ -782,8 +784,9 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: %#Lx: warning: could not find expected COUNT reloc"),
-            abfd, paddr);
+           (_("%pB: %#" PRIx64 ": warning: "
+              "could not find expected COUNT reloc"),
+            abfd, (uint64_t) paddr);
          continue;
        }
 
@@ -792,8 +795,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
       if (irelcount->r_addend == 0)
        {
          /* xgettext:c-format */
-         _bfd_error_handler (_("%pB: %#Lx: warning: bad count"),
-                             abfd, paddr);
+         _bfd_error_handler (_("%pB: %#" PRIx64 ": warning: bad count"),
+                             abfd, (uint64_t) paddr);
          continue;
        }
 
@@ -1196,8 +1199,8 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: %#Lx: fatal: reloc overflow while relaxing"),
-                abfd, irel->r_offset);
+               (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+                abfd, (uint64_t) irel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -1567,8 +1570,8 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: %#Lx: fatal: reloc overflow while relaxing"),
-                abfd, irel->r_offset);
+               (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+                abfd, (uint64_t) irel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4000,9 +4003,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB(%pA+%#Lx): %s relocation against SEC_MERGE section"),
+                   (_("%pB(%pA+%#" PRIx64 "): "
+                      "%s relocation against SEC_MERGE section"),
                     input_bfd, input_section,
-                    rel->r_offset, howto->name);
+                    (uint64_t) rel->r_offset, howto->name);
                  return FALSE;
                }
 
@@ -4118,10 +4122,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+                   (_("%pB(%pA+%#" PRIx64 "): "
+                      "unresolvable %s relocation against symbol `%s'"),
                     input_bfd,
                     input_section,
-                    rel->r_offset,
+                    (uint64_t) rel->r_offset,
                     howto->name,
                     h->root.root.string);
                  return FALSE;
@@ -4197,9 +4202,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: fatal: unaligned branch target for relax-support relocation"),
+                   (_("%pB: %#" PRIx64 ": fatal: "
+                      "unaligned branch target for relax-support relocation"),
                     input_section->owner,
-                    rel->r_offset);
+                    (uint64_t) rel->r_offset);
                  bfd_set_error (bfd_error_bad_value);
                  return FALSE;
                }
@@ -4231,10 +4237,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: %#Lx: fatal: unaligned %s relocation %#Lx"),
-                input_section->owner,
-                rel->r_offset, howto->name,
-                relocation);
+               (_("%pB: %#" PRIx64 ": fatal: "
+                  "unaligned %s relocation %#" PRIx64),
+                input_section->owner, (uint64_t) rel->r_offset,
+                howto->name, (uint64_t) relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4247,10 +4253,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: %#Lx: fatal: unaligned %s relocation %#Lx"),
+               (_("%pB: %#" PRIx64 ": fatal: "
+                  "unaligned %s relocation %#" PRIx64 ""),
                 input_section->owner,
-                rel->r_offset, howto->name,
-                relocation);
+                (uint64_t) rel->r_offset, howto->name,
+                (uint64_t) relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4262,10 +4269,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: %#Lx: fatal: R_SH_PSHA relocation %Ld not in range -32..32"),
+               (_("%pB: %#" PRIx64 ": fatal: R_SH_PSHA relocation %" PRId64
+                  " not in range -32..32"),
                 input_section->owner,
-                rel->r_offset,
-                relocation);
+                (uint64_t) rel->r_offset,
+                (int64_t) relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4277,10 +4285,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: %#Lx: fatal: R_SH_PSHL relocation %Ld not in range -32..32"),
+               (_("%pB: %#" PRIx64 ": fatal: R_SH_PSHL relocation %" PRId64
+                  " not in range -32..32"),
                 input_section->owner,
-                rel->r_offset,
-                relocation);
+                (uint64_t) rel->r_offset,
+                (int64_t) relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4423,10 +4432,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB(%pA+%#Lx): cannot emit fixup to `%s' in read-only section"),
+                     (_("%pB(%pA+%#" PRIx64 "): "
+                        "cannot emit fixup to `%s' in read-only section"),
                       input_bfd,
                       input_section,
-                      rel->r_offset,
+                      (uint64_t) rel->r_offset,
                       symname);
                    return FALSE;
                  }
@@ -4896,10 +4906,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB(%pA+%#Lx): cannot emit fixup to `%s' in read-only section"),
+                     (_("%pB(%pA+%#" PRIx64 "): "
+                        "cannot emit fixup to `%s' in read-only section"),
                       input_bfd,
                       input_section,
-                      rel->r_offset,
+                      (uint64_t) rel->r_offset,
                       symname);
                    return FALSE;
                  }
@@ -4998,9 +5009,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): %s relocation against external symbol \"%s\""),
-                input_bfd, input_section, rel->r_offset, howto->name,
-                h->root.root.string);
+               (_("%pB(%pA+%#" PRIx64 "): "
+                  "%s relocation against external symbol \"%s\""),
+                input_bfd, input_section, (uint64_t) rel->r_offset,
+                howto->name, h->root.root.string);
              return FALSE;
            }
          else
index 1870072b6098b058bf92e2cb37d17244c45836f5..b63584195ff720b39a5231ed291af184233be52a 100644 (file)
@@ -597,9 +597,10 @@ shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%pB: error: unaligned relocation type %d at %#Lx reloc %#Lx"),
+       (_("%pB: error: unaligned relocation type %d "
+          "at %#" PRIx64 " reloc %#" PRIx64),
         input_section->owner, (int) ELF32_R_TYPE (rel->r_info),
-        rel->r_offset, *relocation);
+        (uint64_t) rel->r_offset, (uint64_t) *relocation);
       return FALSE;
     }
 
index 62afc6940eaa0a0929d7e895262dd7a9e55eca59..0ce3e9cd124509118de2d4bde31edb483a474eef 100644 (file)
@@ -5040,10 +5040,11 @@ spu_elf_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%s+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%s+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             bfd_get_section_name (input_bfd, input_section),
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             sym_name);
          ret = FALSE;
index 24920b090aa909cc33ec4b7f11669c28ec9c91d5..d5d264d68016c08a2c2976a5034964ab90416ac7 100644 (file)
@@ -2567,21 +2567,21 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
              if (h == NULL)
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%pB, section %pA: relocation %s with non-zero addend %Ld"
-                    " against local symbol"),
+                 (_("%pB, section %pA: relocation %s with non-zero addend %"
+                    PRId64 " against local symbol"),
                   input_bfd,
                   input_section,
                   elf32_tic6x_howto_table[r_type].name,
-                  rel->r_addend);
+                  (int64_t) rel->r_addend);
              else
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%pB, section %pA: relocation %s with non-zero addend %Ld"
-                    " against symbol `%s'"),
+                 (_("%pB, section %pA: relocation %s with non-zero addend %"
+                    PRId64 " against symbol `%s'"),
                   input_bfd,
                   input_section,
                   elf32_tic6x_howto_table[r_type].name,
-                  rel->r_addend,
+                  (int64_t) rel->r_addend,
                   h->root.root.string[0] != '\0' ? h->root.root.string
                   : _("[whose name is lost]"));
 
index 442e582e60ec7543e5be5993326963dfe1f968d9..24fc64e0f113bb7a42f8308fdb327d1456527cfb 100644 (file)
@@ -3398,10 +3398,11 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%pB(%pA+%#" PRIx64 "): "
+            "unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          rel->r_offset,
+          (uint64_t) rel->r_offset,
           howto->name,
           h->root.root.string);
 
index 5fb3732092bf1001dcd99f20799c10d5e195166e..3b5ce941049e0053b0d5b133f8d83d5abc6b3063 100644 (file)
@@ -3598,9 +3598,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: warning: R_V850_LONGCALL points to "
+                   (_("%pB: %#" PRIx64 ": warning: R_V850_LONGCALL points to "
                       "unrecognized insns"),
-                    abfd, irel->r_offset);
+                    abfd, (uint64_t) irel->r_offset);
                  continue;
                }
 
@@ -3608,10 +3608,10 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: warning: R_V850_LONGCALL points to "
+                   (_("%pB: %#" PRIx64 ": warning: R_V850_LONGCALL points to "
                       "unrecognized insn %#x"),
                     abfd,
-                    irel->r_offset + no_match,
+                    (uint64_t) (irel->r_offset + no_match),
                     insn[no_match]);
                  continue;
                }
@@ -3653,9 +3653,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: warning: R_V850_LONGCALL points to "
+                   (_("%pB: %#" PRIx64 ": warning: R_V850_LONGCALL points to "
                       "unrecognized reloc"),
-                    abfd, irel->r_offset);
+                    abfd, (uint64_t) irel->r_offset);
 
                  continue;
                }
@@ -3693,10 +3693,10 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: warning: R_V850_LONGCALL points to "
-                      "unrecognized reloc %#Lx"),
-                    abfd, irel->r_offset,
-                    irelcall->r_offset);
+                   (_("%pB: %#" PRIx64 ": warning: R_V850_LONGCALL points to "
+                      "unrecognized reloc %#" PRIx64),
+                    abfd, (uint64_t) irel->r_offset,
+                    (uint64_t) irelcall->r_offset);
                  continue;
                }
 
@@ -3836,9 +3836,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: warning: R_V850_LONGJUMP points to "
+                   (_("%pB: %#" PRIx64 ": warning: R_V850_LONGJUMP points to "
                       "unrecognized insns"),
-                    abfd, irel->r_offset);
+                    abfd, (uint64_t) irel->r_offset);
                  continue;
                }
 
@@ -3846,10 +3846,10 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: warning: R_V850_LONGJUMP points to "
+                   (_("%pB: %#" PRIx64 ": warning: R_V850_LONGJUMP points to "
                       "unrecognized insn %#x"),
                     abfd,
-                    irel->r_offset + no_match,
+                    (uint64_t) (irel->r_offset + no_match),
                     insn[no_match]);
                  continue;
                }
@@ -3880,9 +3880,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: %#Lx: warning: R_V850_LONGJUMP points to "
+                   (_("%pB: %#" PRIx64 ": warning: R_V850_LONGJUMP points to "
                       "unrecognized reloc"),
-                    abfd, irel->r_offset);
+                    abfd, (uint64_t) irel->r_offset);
                  continue;
                }
 
index 773e06dff90f580930fed22ea43e7f7cc66de65a..6cee38bd94fe8e27b317952b82081ebb7f0fbd64 100644 (file)
@@ -628,10 +628,10 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
                  if (eh->got_addend != (bfd_vma) rel->r_addend)
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB: warning: GOT addend of %Ld to `%s' does"
-                        " not match previous GOT addend of %Ld"),
-                        abfd, rel->r_addend, h->root.root.string,
-                        eh->got_addend);
+                     (_("%pB: warning: GOT addend of %" PRId64 " to `%s' does"
+                        " not match previous GOT addend of %" PRId64),
+                        abfd, (int64_t) rel->r_addend, h->root.root.string,
+                        (int64_t) eh->got_addend);
 
                }
            }
@@ -1442,9 +1442,10 @@ elf_vax_relocate_section (bfd *output_bfd,
          else if (rel->r_addend != 0)
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB: warning: PLT addend of %Ld to `%s'"
+             (_("%pB: warning: PLT addend of %" PRId64 " to `%s'"
                 " from %pA section ignored"),
-              input_bfd, rel->r_addend, h->root.root.string, input_section);
+              input_bfd, (int64_t) rel->r_addend, h->root.root.string,
+              input_section);
          rel->r_addend = 0;
 
          break;
@@ -1574,8 +1575,9 @@ elf_vax_relocate_section (bfd *output_bfd,
                  else
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB: warning: %s relocation to %#Lx from %pA section"),
-                     input_bfd, howto->name, outrel.r_addend,
+                     (_("%pB: warning: %s relocation to %#" PRIx64
+                        " from %pA section"),
+                     input_bfd, howto->name, (uint64_t) outrel.r_addend,
                      input_section);
                }
              loc = sreloc->contents;
index 44c8589041b395133027374d62a73746d9b91670..86ecbcb5ca999311f552085b3f84fe7872cf36c4 100644 (file)
@@ -2652,8 +2652,10 @@ elf_xtensa_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): relocation offset out of range (size=%#Lx)"),
-            input_bfd, input_section, rel->r_offset, input_size);
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "relocation offset out of range (size=%#" PRIx64 ")"),
+            input_bfd, input_section, (uint64_t) rel->r_offset,
+            (uint64_t) input_size);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -2678,12 +2680,12 @@ elf_xtensa_relocate_section (bfd *output_bfd,
          _bfd_error_handler
            ((sym_type == STT_TLS
              /* xgettext:c-format */
-             ? _("%pB(%pA+%#Lx): %s used with TLS symbol %s")
+             ? _("%pB(%pA+%#" PRIx64 "): %s used with TLS symbol %s")
              /* xgettext:c-format */
-             : _("%pB(%pA+%#Lx): %s used with non-TLS symbol %s")),
+             : _("%pB(%pA+%#" PRIx64 "): %s used with non-TLS symbol %s")),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             name);
        }
@@ -2936,10 +2938,11 @@ elf_xtensa_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             name);
          return FALSE;
@@ -6414,9 +6417,10 @@ extend_ebb_bounds_forward (ebb_t *ebb)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): could not decode instruction; "
+           (_("%pB(%pA+%#" PRIx64 "): could not decode instruction; "
               "possible configuration mismatch"),
-            ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len);
+            ebb->sec->owner, ebb->sec,
+            (uint64_t) (ebb->end_offset + insn_block_len));
          return FALSE;
        }
       ebb->end_offset += insn_block_len;
@@ -6492,9 +6496,10 @@ extend_ebb_bounds_backward (ebb_t *ebb)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): could not decode instruction; "
+           (_("%pB(%pA+%#" PRIx64 "): could not decode instruction; "
               "possible configuration mismatch"),
-            ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len);
+            ebb->sec->owner, ebb->sec,
+            (uint64_t) (ebb->end_offset + insn_block_len));
          return FALSE;
        }
       ebb->start_offset -= insn_block_len;
@@ -7607,10 +7612,10 @@ compute_text_actions (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): could not decode instruction for "
+           (_("%pB(%pA+%#" PRIx64 "): could not decode instruction for "
               "XTENSA_ASM_SIMPLIFY relocation; "
               "possible configuration mismatch"),
-            sec->owner, sec, r_offset);
+            sec->owner, sec, (uint64_t) r_offset);
          continue;
        }
 
@@ -7868,9 +7873,9 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table)
  decode_error:
   _bfd_error_handler
     /* xgettext:c-format */
-    (_("%pB(%pA+%#Lx): could not decode instruction; "
+    (_("%pB(%pA+%#" PRIx64 "): could not decode instruction; "
        "possible configuration mismatch"),
-     ebb->sec->owner, ebb->sec, offset);
+     ebb->sec->owner, ebb->sec, (uint64_t) offset);
   return FALSE;
 }
 
@@ -10646,8 +10651,8 @@ do_fix_for_relocatable_link (Elf_Internal_Rela *rel,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unexpected fix for %s relocation"),
-            input_bfd, input_section, rel->r_offset,
+           (_("%pB(%pA+%#" PRIx64 "): unexpected fix for %s relocation"),
+            input_bfd, input_section, (uint64_t) rel->r_offset,
             elf_howto_table[r_type].name);
          return FALSE;
        }
index eb711535bb11b8a5735174321efe695d688fcc49..8db09870307b37945ac79186adad50fe4d679094 100644 (file)
@@ -3014,8 +3014,9 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval,
       reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%pB: %pA+%#Lx: warning: %s relocation against unexpected insn"),
-        info->abfd, info->sec, irel->r_offset, howto->name);
+       (_("%pB: %pA+%#" PRIx64 ": warning: "
+          "%s relocation against unexpected insn"),
+        info->abfd, info->sec, (uint64_t) irel->r_offset, howto->name);
       return TRUE;
     }
 
@@ -3209,8 +3210,9 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%pB: %pA+%#Lx: warning: LITERAL relocation against unexpected insn"),
-        abfd, info->sec, irel->r_offset);
+       (_("%pB: %pA+%#" PRIx64 ": warning: "
+          "LITERAL relocation against unexpected insn"),
+        abfd, info->sec, (uint64_t) irel->r_offset);
       return TRUE;
     }
 
index a289c73d530e29122faf933d8efe2ec45cb19735..2e66c92bfb5389891dffbe200b917417f04f2e1f 100644 (file)
@@ -2078,8 +2078,8 @@ elf64_hppa_finish_dynamic_symbol (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("stub entry for %s cannot load .plt, dp offset = %Ld"),
-            hh->eh.root.root.string, value);
+           (_("stub entry for %s cannot load .plt, dp offset = %" PRId64),
+            hh->eh.root.root.string, (int64_t) value);
          return FALSE;
        }
 
@@ -3283,10 +3283,10 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB(%pA+%#Lx): cannot reach %s"),
+             (_("%pB(%pA+%#" PRIx64 "): cannot reach %s"),
              input_bfd,
              input_section,
-             offset,
+             (uint64_t) offset,
              eh ? eh->root.root.string : "unknown");
            bfd_set_error (bfd_error_bad_value);
            return bfd_reloc_overflow;
index c536e15516ae58447df2ac7e2fd8ebd70d436ce6..e8cae736078c54bee0682ddc89263b192737f097 100644 (file)
@@ -584,9 +584,9 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: Can't relax br at %#Lx in section `%pA'."
+               (_("%pB: Can't relax br at %#" PRIx64 " in section `%pA'."
                   " Please use brl or indirect branch."),
-                sec->owner, roff, sec);
+                sec->owner, (uint64_t) roff, sec);
              bfd_set_error (bfd_error_bad_value);
              goto error_return;
            }
@@ -3278,8 +3278,8 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
 overflow:
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: short data segment overflowed (%#Lx >= 0x400000)"),
-            abfd, max_short_vma - min_short_vma);
+           (_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"),
+            abfd, (uint64_t) (max_short_vma - min_short_vma));
          return FALSE;
        }
       else if ((gp_val > min_short_vma
@@ -3947,9 +3947,9 @@ elf64_ia64_relocate_section (bfd *output_bfd,
                _bfd_error_handler
                  /* xgettext:c-format */
                  (_("%pB: missing TLS section for relocation %s against `%s'"
-                    " at %#Lx in section `%pA'."),
+                    " at %#" PRIx64 " in section `%pA'."),
                   input_bfd, howto->name, name,
-                  rel->r_offset, input_section);
+                  (uint64_t) rel->r_offset, input_section);
                break;
 
              case R_IA64_PCREL21B:
@@ -3963,10 +3963,11 @@ elf64_ia64_relocate_section (bfd *output_bfd,
                       that the section is too big to relax.  */
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB: Can't relax br (%s) to `%s' at %#Lx in section"
-                        " `%pA' with size %#Lx (> 0x1000000)."),
-                      input_bfd, howto->name, name, rel->r_offset,
-                      input_section, input_section->size);
+                     (_("%pB: Can't relax br (%s) to `%s' "
+                        "at %#" PRIx64 " in section `%pA' "
+                        "with size %#" PRIx64 " (> 0x1000000)."),
+                      input_bfd, howto->name, name, (uint64_t) rel->r_offset,
+                      input_section, (uint64_t) input_section->size);
                    break;
                  }
                /* Fall through.  */
@@ -5158,8 +5159,9 @@ error_free_dyn:
                _bfd_error_handler
                  /* xgettext:c-format */
                  (_("Warning: size of symbol `%s' changed"
-                    " from %Lu in %pB to %Lu in %pB"),
-                  name, h->size, old_bfd, isym->st_size, abfd);
+                    " from %" PRIu64 " in %pB to %" PRIu64 " in %pB"),
+                  name, (uint64_t) h->size, old_bfd,
+                  (uint64_t) isym->st_size, abfd);
 
              h->size = isym->st_size;
            }
index 472f56e154632e979020ce5ca0ff7e79a8a69c34..126133bca18c2f6aec9b938e107cfd99abe04401 100644 (file)
@@ -1193,10 +1193,10 @@ mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto,
            _bfd_error_handler
              /* xgettext:c-format */
              (_("%pB: Internal inconsistency error for value for\n\
- linker-allocated global register: linked: %#Lx != relaxed: %#Lx"),
+ linker-allocated global register: linked: %#" PRIx64 " != relaxed: %#" PRIx64 ""),
               isec->owner,
-              value,
-              gregdata->reloc_request[bpo_index].value);
+              (uint64_t) value,
+              (uint64_t) gregdata->reloc_request[bpo_index].value);
            bfd_set_error (bfd_error_bad_value);
            return bfd_reloc_overflow;
          }
@@ -1738,9 +1738,10 @@ mmix_final_link_relocate (reloc_howto_type *howto, asection *input_section,
            /* FIXME: Better error message.  */
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB: LOCAL directive: Register $%Ld is not a local register."
-                "  First global register is $%Ld."),
-              input_section->owner, srel, first_global);
+             (_("%pB: LOCAL directive: "
+                "Register $%" PRId64 " is not a local register."
+                "  First global register is $%" PRId64 "."),
+              input_section->owner, (int64_t) srel, (int64_t) first_global);
 
            return bfd_reloc_overflow;
          }
index 9a3ee44e135522a56ed8980f2d68f2ca5c54b8d5..1e1b39bc929c4599076a3c3b096f5709ec5f45ca 100644 (file)
@@ -2072,10 +2072,10 @@ invalid_tls_insn (bfd *input_bfd,
   howto = elf_howto_table + ELF64_R_TYPE (rel->r_info);
   _bfd_error_handler
     /* xgettext:c-format */
-    (_("%pB(%pA+%#Lx): invalid instruction for TLS relocation %s"),
+    (_("%pB(%pA+%#" PRIx64 "): invalid instruction for TLS relocation %s"),
      input_bfd,
      input_section,
-     rel->r_offset,
+     (uint64_t) rel->r_offset,
      howto->name);
   bfd_set_error (bfd_error_bad_value);
 }
@@ -3115,10 +3115,11 @@ elf_s390_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%pB(%pA+%#" PRIx64 "): "
+            "unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          rel->r_offset,
+          (uint64_t) rel->r_offset,
           howto->name,
           h->root.root.string);
 
@@ -3172,9 +3173,9 @@ elf_s390_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): reloc against `%s': error %d"),
+               (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                rel->r_offset, name, (int) r);
+                (uint64_t) rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index 8d6404690226a9da8f5f06971ac7237f31542e0e..5c8c2e809a7de922afdea1f78aa4fa1681fc6b49 100644 (file)
@@ -1536,9 +1536,10 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB(%pA+%#Lx): %s relocation against SEC_MERGE section"),
+                   (_("%pB(%pA+%#" PRIx64 "): "
+                      "%s relocation against SEC_MERGE section"),
                     input_bfd, input_section,
-                    rel->r_offset, howto->name);
+                    (uint64_t) rel->r_offset, howto->name);
                  return FALSE;
                }
 
@@ -1633,10 +1634,11 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+                   (_("%pB(%pA+%#" PRIx64 "): "
+                      "unresolvable %s relocation against symbol `%s'"),
                     input_bfd,
                     input_section,
-                    rel->r_offset,
+                    (uint64_t) rel->r_offset,
                     howto->name,
                     h->root.root.string);
                }
@@ -1677,9 +1679,10 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: error: unaligned relocation type %d at %08Lx reloc %08Lx"),
-            input_bfd, (int) r_type, rel->r_offset,
-            relocation);
+           (_("%pB: error: unaligned relocation type %d at "
+              "%08" PRIx64 " reloc %08" PRIx64 ""),
+            input_bfd, (int) r_type,
+            (uint64_t) rel->r_offset, (uint64_t) relocation);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
index b9efcfcf2eb3930ab9890521a827e6cd7ddeb50a..d66d9ba5fc1bcc952e8c993e76ecb093a7679345 100644 (file)
@@ -1332,9 +1332,9 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd,
 
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%pB: TLS transition from %s to %s against `%s' at %#Lx "
-          "in section `%pA' failed"),
-        abfd, from->name, to->name, name, rel->r_offset, sec);
+       (_("%pB: TLS transition from %s to %s against `%s' at %#" PRIx64
+          " in section `%pA' failed"),
+        abfd, from->name, to->name, name, (uint64_t) rel->r_offset, sec);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -2645,8 +2645,8 @@ do_ifunc_pointer:
                  _bfd_error_handler
                    /* xgettext:c-format */
                    (_("%pB: relocation %s against STT_GNU_IFUNC "
-                      "symbol `%s' has non-zero addend: %Ld"),
-                    input_bfd, howto->name, name, rel->r_addend);
+                      "symbol `%s' has non-zero addend: %" PRId64),
+                    input_bfd, howto->name, name, (int64_t) rel->r_addend);
                  bfd_set_error (bfd_error_bad_value);
                  return FALSE;
                }
@@ -3156,10 +3156,11 @@ direct:
                          _bfd_error_handler
                            /* xgettext:c-format */
                            (_("%pB: addend %s%#x in relocation %s against "
-                              "symbol `%s' at %#Lx in section `%pA' is "
-                              "out of range"),
+                              "symbol `%s' at %#" PRIx64
+                              " in section `%pA' is out of range"),
                             input_bfd, addend < 0 ? "-" : "", addend,
-                            howto->name, name, rel->r_offset, input_section);
+                            howto->name, name, (uint64_t) rel->r_offset,
+                            input_section);
                          bfd_set_error (bfd_error_bad_value);
                          return FALSE;
                        }
@@ -3792,10 +3793,11 @@ direct:
            default:
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+               (_("%pB(%pA+%#" PRIx64 "): "
+                  "unresolvable %s relocation against symbol `%s'"),
                 input_bfd,
                 input_section,
-                rel->r_offset,
+                (uint64_t) rel->r_offset,
                 howto->name,
                 h->root.root.string);
              return FALSE;
@@ -3841,9 +3843,9 @@ check_relocation_error:
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB(%pA+%#Lx): reloc against `%s': error %d"),
+               (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                rel->r_offset, name, (int) r);
+                (uint64_t) rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index 947b1930a411b51af71e60dc66a9610e2f964b06..14c8187e3f669655190d9642ed1721caf4312ce4 100644 (file)
@@ -1196,9 +1196,10 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: version count (%Ld) does not match symbol count (%ld)"),
+           (_("%pB: version count (%" PRId64 ")"
+              " does not match symbol count (%ld)"),
             abfd,
-            verhdr->sh_size / sizeof (Elf_External_Versym),
+            (int64_t) (verhdr->sh_size / sizeof (Elf_External_Versym)),
             symcount);
 
          /* Slurp in the symbols without the version information,
index 34a18a5fe76d5a2b8e838ec816587966e2e73f6f..e0b39a7716abcac72c8592e364fcc2e48e0aeb14 100644 (file)
@@ -298,8 +298,8 @@ elf_core_file_p (bfd *abfd)
            _bfd_error_handler
              /* xgettext:c-format */
              (_("warning: %pB is truncated: expected core file "
-                "size >= %Lu, found: %llu"),
-              abfd, high, (unsigned long long) statbuf.st_size);
+                "size >= %" PRIu64 ", found: %llu"),
+              abfd, (uint64_t) high, (unsigned long long) statbuf.st_size);
          }
       }
   }
index 5d95b2e209957e8d90e051c95f8bbaba81f85f67..d9be92482ffa06297db331cbffc560cbfa062d32 100644 (file)
@@ -2440,10 +2440,10 @@ elf_link_read_relocs_from_section (bfd *abfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: bad reloc symbol index (%#Lx >= %#lx)"
-                  " for offset %#Lx in section `%pA'"),
-                abfd, r_symndx, (unsigned long) nsyms,
-                irela->r_offset, sec);
+               (_("%pB: bad reloc symbol index (%#" PRIx64 " >= %#lx)"
+                  " for offset %#" PRIx64 " in section `%pA'"),
+                abfd, (uint64_t) r_symndx, (unsigned long) nsyms,
+                (uint64_t) irela->r_offset, sec);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -2452,11 +2452,11 @@ elf_link_read_relocs_from_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: non-zero symbol index (%#Lx)"
-              " for offset %#Lx in section `%pA'"
+           (_("%pB: non-zero symbol index (%#" PRIx64 ")"
+              " for offset %#" PRIx64 " in section `%pA'"
               " when the object file has no symbol table"),
-            abfd, r_symndx,
-            irela->r_offset, sec);
+            abfd, (uint64_t) r_symndx,
+            (uint64_t) irela->r_offset, sec);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -4804,8 +4804,9 @@ error_free_dyn:
                _bfd_error_handler
                  /* xgettext:c-format */
                  (_("Warning: size of symbol `%s' changed"
-                    " from %Lu in %pB to %Lu in %pB"),
-                  name, h->size, old_bfd, isym->st_size, abfd);
+                    " from %" PRIu64 " in %pB to %" PRIu64 " in %pB"),
+                  name, (uint64_t) h->size, old_bfd,
+                  (uint64_t) isym->st_size, abfd);
 
              h->size = isym->st_size;
            }
@@ -10584,9 +10585,9 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
                    {
                      _bfd_error_handler
                        /* xgettext:c-format */
-                       (_("error: %pB contains a reloc (%#Lx) for section %pA "
+                       (_("error: %pB contains a reloc (%#" PRIx64 ") for section %pA "
                           "that references a non-existent global symbol"),
-                        input_bfd, rel->r_info, o);
+                        input_bfd, (uint64_t) rel->r_info, o);
                      bfd_set_error (bfd_error_bad_value);
                      return FALSE;
                    }
@@ -13508,8 +13509,8 @@ bfd_elf_gc_record_vtinherit (bfd *abfd,
     }
 
   /* xgettext:c-format */
-  _bfd_error_handler (_("%pB: %pA+%#Lx: No symbol found for INHERIT"),
-                     abfd, sec, offset);
+  _bfd_error_handler (_("%pB: %pA+%#" PRIx64 ": No symbol found for INHERIT"),
+                     abfd, sec, (uint64_t) offset);
   bfd_set_error (bfd_error_invalid_operation);
   return FALSE;
 
index 70fbe9356bf3418670995d927a53fa066254bee8..e1797b39930075c7528b9259b219cc8c108f9158 100644 (file)
@@ -5106,8 +5106,10 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
            name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, NULL);
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
-            input_bfd, input_section, rel->r_offset, howto->name, name);
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
+            input_bfd, input_section, (uint64_t) rel->r_offset,
+            howto->name, name);
          bfd_set_error (bfd_error_bad_value);
          return bfd_reloc_notsupported;
        }
@@ -5146,8 +5148,8 @@ bad_ifunc_reloc:
              _bfd_error_handler
                /* xgettext:c-format */
                (_("%pB: relocation %s against STT_GNU_IFUNC "
-                  "symbol `%s' has non-zero addend: %Ld"),
-                input_bfd, howto->name, name, rel->r_addend);
+                  "symbol `%s' has non-zero addend: %" PRId64),
+                input_bfd, howto->name, name, (int64_t) rel->r_addend);
              bfd_set_error (bfd_error_bad_value);
              return bfd_reloc_notsupported;
            }
@@ -6297,11 +6299,11 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
          _bfd_error_handler
            ((sym_type == STT_TLS
              /* xgettext:c-format */
-             ? _("%pB(%pA+%#Lx): %s used with TLS symbol %s")
+             ? _("%pB(%pA+%#" PRIx64 "): %s used with TLS symbol %s")
              /* xgettext:c-format */
-             : _("%pB(%pA+%#Lx): %s used with non-TLS symbol %s")),
+             : _("%pB(%pA+%#" PRIx64 "): %s used with non-TLS symbol %s")),
             input_bfd,
-            input_section, rel->r_offset, howto->name, name);
+            input_section, (uint64_t) rel->r_offset, howto->name, name);
        }
 
       /* We relax only if we can see that there can be a valid transition
@@ -6569,8 +6571,9 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
-            input_bfd, input_section, rel->r_offset, howto->name,
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
+            input_bfd, input_section, (uint64_t) rel->r_offset, howto->name,
             h->root.root.string);
          return FALSE;
        }
index 9d46ed5465fc8df310d7493fa0e63e0fdfe4bcb7..842417a046b178b64bc2c76018a8af8dc6755de3 100644 (file)
@@ -617,9 +617,9 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: Can't relax br at %#Lx in section `%pA'."
+               (_("%pB: Can't relax br at %#" PRIx64 " in section `%pA'."
                   " Please use brl or indirect branch."),
-                sec->owner, roff, sec);
+                sec->owner, (uint64_t) roff, sec);
              bfd_set_error (bfd_error_bad_value);
              goto error_return;
            }
@@ -3693,8 +3693,8 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
 overflow:
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: short data segment overflowed (%#Lx >= 0x400000)"),
-            abfd, max_short_vma - min_short_vma);
+           (_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"),
+            abfd, (uint64_t) (max_short_vma - min_short_vma));
          return FALSE;
        }
       else if ((gp_val > min_short_vma
@@ -4482,9 +4482,9 @@ missing_tls_sec:
                _bfd_error_handler
                  /* xgettext:c-format */
                  (_("%pB: missing TLS section for relocation %s against `%s'"
-                    " at %#Lx in section `%pA'."),
+                    " at %#" PRIx64 " in section `%pA'."),
                   input_bfd, howto->name, name,
-                  rel->r_offset, input_section);
+                  (uint64_t) rel->r_offset, input_section);
                break;
 
              case R_IA64_PCREL21B:
@@ -4498,10 +4498,11 @@ missing_tls_sec:
                       that the section is too big to relax.  */
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB: Can't relax br (%s) to `%s' at %#Lx"
-                        " in section `%pA' with size %#Lx (> 0x1000000)."),
-                      input_bfd, howto->name, name, rel->r_offset,
-                      input_section, input_section->size);
+                     (_("%pB: Can't relax br (%s) to `%s' at %#" PRIx64
+                        " in section `%pA' with size %#" PRIx64
+                        " (> 0x1000000)."),
+                      input_bfd, howto->name, name, (uint64_t) rel->r_offset,
+                      input_section, (uint64_t) input_section->size);
                    break;
                  }
                /* Fall through.  */
index efbd882f98f97f716b4b78ee567f735fa4336702..5c8d4ab12dedac1bff582c03aad0def394067e52 100644 (file)
@@ -2213,10 +2213,11 @@ riscv_elf_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        {
          (*_bfd_error_handler)
-           (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%pA+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             h->root.root.string);
          continue;
index 3d09048526b211e5978ddaff6df6a8969accd833..72530903a8c476c632b9dcee646a6a095329146d 100644 (file)
@@ -7107,9 +7107,10 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
       if (hdr->sh_size != sizeof (Elf32_External_RegInfo))
        {
          _bfd_error_handler
-           (_("%pB: Incorrect `.reginfo' section size; expected %Lu, got %Lu"),
-            abfd, (bfd_size_type) sizeof (Elf32_External_RegInfo),
-            hdr->sh_size);
+           (_("%pB: Incorrect `.reginfo' section size; "
+              "expected %" PRIu64 ", got %" PRIu64),
+            abfd, (uint64_t) sizeof (Elf32_External_RegInfo),
+            (uint64_t) hdr->sh_size);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -8471,8 +8472,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: GOT reloc at %#Lx not expected in executables"),
-                abfd, rel->r_offset);
+               (_("%pB: GOT reloc at %#" PRIx64 " not expected in executables"),
+                abfd, (uint64_t) rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -8609,8 +8610,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: CALL16 reloc at %#Lx not against global symbol"),
-                abfd, rel->r_offset);
+               (_("%pB: CALL16 reloc at %#" PRIx64 " not against global symbol"),
+                abfd, (uint64_t) rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -10153,9 +10154,9 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                      _bfd_error_handler
                        /* xgettext:c-format */
                        (_("%pB: Can't find matching LO16 reloc against `%s'"
-                          " for %s at %#Lx in section `%pA'"),
+                          " for %s at %#" PRIx64 " in section `%pA'"),
                         input_bfd, name,
-                        howto->name, rel->r_offset, input_section);
+                        howto->name, (uint64_t) rel->r_offset, input_section);
                    }
                }
              else
@@ -10696,11 +10697,11 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: `%pA' offset of %Ld from `%pA' "
+                   (_("%pB: `%pA' offset of %" PRId64 " from `%pA' "
                       "beyond the range of ADDIUPC"),
                     output_bfd,
                     htab->root.sgotplt->output_section,
-                    gotpc_offset,
+                    (int64_t) gotpc_offset,
                     htab->root.splt->output_section);
                  bfd_set_error (bfd_error_no_error);
                  return FALSE;
@@ -11264,10 +11265,11 @@ mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%pB: `%pA' offset of %Ld from `%pA' beyond the range of ADDIUPC"),
+           (_("%pB: `%pA' offset of %" PRId64 " from `%pA' "
+              "beyond the range of ADDIUPC"),
             output_bfd,
             htab->root.sgotplt->output_section,
-            gotpc_offset,
+            (int64_t) gotpc_offset,
             htab->root.splt->output_section);
          bfd_set_error (bfd_error_no_error);
          return FALSE;
index 143e9a3b6e7edf3f7ae75d6b5f5a0f5ca77d0313..89d3a37626faa94e9a518e7d2c49508d9a3f7583 100644 (file)
@@ -3877,10 +3877,11 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%pB(%pA+%#" PRIx64 "): "
+            "unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          rel->r_offset,
+          (uint64_t) rel->r_offset,
           howto->name,
           h->root.root.string);
 
index ab30fddf5232602b4912b26849cc0c6d6d36f7d2..04cf932d9de608912d27788fa169f0553f80058d 100644 (file)
@@ -3778,10 +3778,11 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%pB(%pA+%#" PRIx64 "): "
+            "unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          rel->r_offset,
+          (uint64_t) rel->r_offset,
           howto->name,
           h->root.root.string);
 
index 7fb6eb589223cc0b1314be1c0538ac13f381d9d8..7285ee5b552f8559d6b706263a8537d8b63ac63f 100644 (file)
@@ -859,8 +859,8 @@ ieee_slurp_external_symbols (bfd *abfd)
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%pB: unexpected ATN type %Ld in external part"),
-                        abfd, value);
+                     (_("%pB: unexpected ATN type %" PRId64 " in external part"),
+                        abfd, (int64_t) value);
                    bfd_set_error (bfd_error_bad_value);
                    return FALSE;
                  }
index 6b83332f3c92aebe7702269fd07e086f12304084..096c19ce2ee2af98d5d2186be5146981663ebaf9 100644 (file)
@@ -827,8 +827,9 @@ ihex_write_object_contents (bfd *abfd)
                    {
                      _bfd_error_handler
                        /* xgettext:c-format */
-                       (_("%pB: address %#Lx out of range for Intel Hex file"),
-                        abfd, where);
+                       (_("%pB: address %#" PRIx64
+                          " out of range for Intel Hex file"),
+                        abfd, (uint64_t) where);
                      bfd_set_error (bfd_error_bad_value);
                      return FALSE;
                    }
index 80bf4eca086821b56a8beaf10ee8cdfb1a0c84ae..f26be0c73ea04c0f848f0ad4574395cfca04e479 100644 (file)
@@ -2817,8 +2817,9 @@ bfd_mach_o_build_exec_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("section address (%#Lx) below start of segment (%#Lx)"),
-              s->addr, vma);
+           (_("section address (%#" PRIx64 ") "
+              "below start of segment (%#" PRIx64 ")"),
+              (uint64_t) s->addr, (uint64_t) vma);
          return FALSE;
        }
 
index 9b3e8eaca6b95141a08d45076e299bac5e8f6e1f..790455294276b0e82e8234b2098290d00d036bb3 100644 (file)
@@ -865,8 +865,8 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
       if (offset > sec->rawsize)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%pB: access beyond end of merged section (%Ld)"),
-          sec->owner, offset);
+         (_("%pB: access beyond end of merged section (%" PRId64 ")"),
+          sec->owner, (int64_t) offset);
       return secinfo->first_str ? sec->size : 0;
     }
 
index f5b3d2eb6fea96dbf1db74e80414e67b76ea9057..7671646598866927cd8481f98d78d04307beff31 100644 (file)
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -956,8 +956,8 @@ mmo_write_loc_chunk (bfd *abfd, bfd_vma vma, const bfd_byte *loc,
          _bfd_error_handler
            /* xgettext:c-format */
            (_("%pB: attempt to emit contents at non-multiple-of-4"
-              " address %#Lx"),
-            abfd, vma);
+              " address %#" PRIx64 ""),
+            abfd, (uint64_t) vma);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -3239,14 +3239,14 @@ mmo_write_object_contents (bfd *abfd)
               global registers.  */
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%pB: too many initialized registers; section length %Ld"),
-              abfd, sec->size);
+             (_("%pB: too many initialized registers; section length %" PRId64),
+              abfd, (int64_t) sec->size);
          else
            _bfd_error_handler
              /* xgettext:c-format */
              (_("%pB: invalid start address for initialized registers of"
-                " length %Ld: %#Lx"),
-              abfd, sec->size, sec->vma);
+                " length %" PRId64 ": %#" PRIx64),
+              abfd, (int64_t) sec->size, (uint64_t) sec->vma);
 
          return FALSE;
        }
index 438e0a98710f33a408e4f8cdc868e876edb7a1bb..0ebfe27edf58c08c5bc238acf6f58073d9ce89f1 100644 (file)
@@ -2986,9 +2986,11 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd)
              > bfd_get_section_size (section))
            {
              /* xgettext:c-format */
-             _bfd_error_handler (_("%pB: Data Directory size (%lx) exceeds space left in section (%Lx)"),
-                                 obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size,
-                                 bfd_get_section_size (section) - (addr - section->vma));
+             _bfd_error_handler
+               (_("%pB: Data Directory size (%lx) "
+                  "exceeds space left in section (%" PRIx64 ")"),
+                obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size,
+                (uint64_t) (section->size - (addr - section->vma)));
              return FALSE;
            }
 
index 80b23c56bd3dd1f600aaf60492d1a2f03c4038c0..ac9539082b177792fbbb4cb840165e2c2f19f307 100644 (file)
@@ -1499,9 +1499,10 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%pB: bad XTY_ER symbol `%s': class %d scnum %d scnlen %Ld"),
+               (_("%pB: bad XTY_ER symbol `%s': class %d scnum %d "
+                  "scnlen %" PRId64),
                 abfd, name, sym.n_sclass, sym.n_scnum,
-                aux.x_csect.x_scnlen.l);
+                (int64_t) aux.x_csect.x_scnlen.l);
              bfd_set_error (bfd_error_bad_value);
              goto error_return;
            }
@@ -1529,8 +1530,8 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: XMC_TC0 symbol `%s' is class %d scnlen %Ld"),
-                    abfd, name, sym.n_sclass, aux.x_csect.x_scnlen.l);
+                   (_("%pB: XMC_TC0 symbol `%s' is class %d scnlen %" PRId64),
+                    abfd, name, sym.n_sclass, (int64_t) aux.x_csect.x_scnlen.l);
                  bfd_set_error (bfd_error_bad_value);
                  goto error_return;
                }
@@ -2105,8 +2106,8 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%pB: reloc %s:%Ld not in csect"),
-                    abfd, o->name, i);
+                   (_("%pB: reloc %s:%" PRId64 " not in csect"),
+                    abfd, o->name, (int64_t) i);
                  bfd_set_error (bfd_error_bad_value);
                  goto error_return;
                }
@@ -5112,9 +5113,9 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo)
       if (best_address > toc_start + 0x8000)
        {
          _bfd_error_handler
-           (_("TOC overflow: %#Lx > 0x10000; try -mminimal-toc "
+           (_("TOC overflow: %#" PRIx64 " > 0x10000; try -mminimal-toc "
               "when compiling"),
-            toc_end - toc_start);
+            (uint64_t) (toc_end - toc_start));
          bfd_set_error (bfd_error_file_too_big);
          return FALSE;
        }