]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use %pI, %pR, %pS, %pT in place of %I, %R, %S and %T.
authorAlan Modra <amodra@gmail.com>
Mon, 19 Feb 2018 08:00:41 +0000 (18:30 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 19 Feb 2018 13:25:53 +0000 (23:55 +1030)
bfd/
* elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
* elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
* elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
* elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
* elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
* reloc.c: Replace use of %R and %T in format strings passed to
einfo and friends by %pR and %pT.
ld/
* ldmisc.c (vfinfo) Handle %pI, %pR, %pS and %pT in place of
%I, %R, %S and %T.
* ldcref.c, * ldctor.c, * ldemul.c, * ldexp.c, * ldgram.y,
* ldlang.c, * ldlex.l, * ldmain.c, * ldmisc.c, * pe-dll.c,
* emultempl/sh64elf.em: Replace use of of %I, %R, %S and %T in
format strings passed to einfo and friends by %pI, %pR, %pS and %pT.

34 files changed:
bfd/ChangeLog
bfd/elf32-arm.c
bfd/elf32-hppa.c
bfd/elf32-lm32.c
bfd/elf32-m32r.c
bfd/elf32-metag.c
bfd/elf32-nds32.c
bfd/elf32-or1k.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfnn-riscv.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c
bfd/elfxx-x86.c
bfd/reloc.c
ld/ChangeLog
ld/emultempl/sh64elf.em
ld/ldcref.c
ld/ldctor.c
ld/ldemul.c
ld/ldexp.c
ld/ldgram.y
ld/ldlang.c
ld/ldlex.l
ld/ldmain.c
ld/ldmisc.c
ld/pe-dll.c

index 7275105fd24868eb1072aef056c09e65abc1ea71..2a6eeb60473eef8032c9ce0e23a3b7852c433d01 100644 (file)
@@ -1,3 +1,13 @@
+2018-02-19  Alan Modra  <amodra@gmail.com>
+
+       * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
+       * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
+       * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
+       * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
+       * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
+       * reloc.c: Replace use of %R and %T in format strings passed to
+       einfo and friends by %pR and %pT.
+
 2018-02-19  Alan Modra  <amodra@gmail.com>
 
        * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
index badf82e7a12c9ddc6e7c73f08fe037786e213021..6109dab938e78298bd214d3e13ee1a83896b3bf9 100644 (file)
@@ -15633,7 +15633,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 84394e57f8322cdbaa142048ff5f5fc4a3bca3c2..f4f1297eb7956a4783dd720116ad93f070882060 100644 (file)
@@ -2079,7 +2079,7 @@ maybe_set_textrel (struct elf_link_hash_entry *eh, void *inf)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, eh->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 192c712a9643fc72ee9eb935721e505d5640b250..6269775e14f61341e8a44d6a4b17edd2f40bcab8 100644 (file)
@@ -1986,7 +1986,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index da540b9594b9ccfec27e7a8dee350bed85f33bf5..985047e47f8f9adaeb24efe1840a58ac811a2d15 100644 (file)
@@ -2094,7 +2094,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 9de08b32962942eacd7be1c364cfd85e30aea2b0..dc867ce3f1059c1ce0e9ecff85905adc6b13200c 100644 (file)
@@ -2789,7 +2789,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 3ca6f51413297241c76a99637362d77b89af9a56..70cf1dcc63e059e64ef1c536787d36224e0c4d0c 100644 (file)
@@ -3841,7 +3841,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
@@ -12827,7 +12827,7 @@ nds32_elf_get_relocated_section_contents (bfd *abfd,
                     message instead.  */
                  link_info->callbacks->einfo
                    /* xgettext:c-format */
-                   (_("%X%P: %pB(%pA): relocation \"%R\" goes out of range\n"),
+                   (_("%X%P: %pB(%pA): relocation \"%pR\" goes out of range\n"),
                     abfd, input_section, * parent);
                  goto error_return;
 
index 67e5769e5e2ff4cdf027fecbf54fef96027c469c..e630a45c44f136103e262df094141ab552666d32 100644 (file)
@@ -2278,7 +2278,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 1cacb79301826064b7b1aa7836c18e04a8d7cafb..c9db21c710a3eeb304ef7687fb69ca53e405611b 100644 (file)
@@ -6163,7 +6163,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index f82b227ab5c461efff97ae1e8353a99755842257..3ddbd46901802667e813258f2f68cd188562ccb9 100644 (file)
@@ -1848,7 +1848,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 5c80ab4bcd5323f9db946f3a5ec5116c40df9340..7c8ec6c684a0c87cc37e990eaaf188413a9836b6 100644 (file)
@@ -3286,7 +3286,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 04be4b386098c78ae8dbdbb72c6f727e250da59f..24920b090aa909cc33ec4b7f11669c28ec9c91d5 100644 (file)
@@ -3202,7 +3202,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 1b7526257ec771041a5ea94af5e60282c2c137cd..442e582e60ec7543e5be5993326963dfe1f968d9 100644 (file)
@@ -2234,7 +2234,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index b6c61055ba183a93b39a1995f2ffedfd8ddea775..f8b6629d2d99ce150ce0cee44d7d3f681e975141 100644 (file)
@@ -7262,7 +7262,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
         sections.  Allow them to proceed, but warn that this might
         break at runtime.  */
       info->callbacks->einfo
-       (_("%P: copy reloc against `%T' requires lazy plt linking; "
+       (_("%P: copy reloc against `%pT' requires lazy plt linking; "
           "avoid setting LD_BIND_NOW=1 or upgrade gcc\n"),
         h->root.root.string);
     }
@@ -9933,7 +9933,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *inf)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
@@ -10780,7 +10780,7 @@ get_r2off (struct bfd_link_info *info,
       if (strcmp (opd->name, ".opd") != 0
          || opd->reloc_count != 0)
        {
-         info->callbacks->einfo (_("%P: cannot find opd entry toc for `%T'\n"),
+         info->callbacks->einfo (_("%P: cannot find opd entry toc for `%pT'\n"),
                                  stub_entry->h->elf.root.root.string);
          bfd_set_error (bfd_error_bad_value);
          return (bfd_vma) -1;
@@ -10991,7 +10991,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
       if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
        {
          info->callbacks->einfo
-           (_("%P: linkage table error against `%T'\n"),
+           (_("%P: linkage table error against `%pT'\n"),
             stub_entry->root.string);
          bfd_set_error (bfd_error_bad_value);
          htab->stub_error = TRUE;
@@ -11137,7 +11137,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
        {
          info->callbacks->einfo
            /* xgettext:c-format */
-           (_("%P: linkage table error against `%T'\n"),
+           (_("%P: linkage table error against `%pT'\n"),
             stub_entry->h != NULL
             ? stub_entry->h->elf.root.root.string
             : "<local sym>");
@@ -13006,7 +13006,7 @@ build_global_entry_stubs (struct elf_link_hash_entry *h, void *inf)
        if (off + 0x80008000 > 0xffffffff || (off & 3) != 0)
          {
            info->callbacks->einfo
-             (_("%P: linkage table error against `%T'\n"),
+             (_("%P: linkage table error against `%pT'\n"),
               h->root.root.string);
            bfd_set_error (bfd_error_bad_value);
            htab->stub_error = TRUE;
@@ -13608,9 +13608,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
            info->callbacks->einfo
              (!IS_PPC64_TLS_RELOC (r_type)
               /* xgettext:c-format */
-              ? _("%H: %s used with TLS symbol `%T'\n")
+              ? _("%H: %s used with TLS symbol `%pT'\n")
               /* xgettext:c-format */
-              : _("%H: %s used with non-TLS symbol `%T'\n"),
+              : _("%H: %s used with non-TLS symbol `%pT'\n"),
               input_bfd, input_section, rel->r_offset,
               ppc64_elf_howto_table[r_type]->name,
               sym_name);
@@ -14220,13 +14220,13 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                      || stub_entry->stub_type == ppc_stub_plt_call_r2save)
                    info->callbacks->einfo
                      /* xgettext:c-format */
-                     (_("%H: call to `%T' lacks nop, can't restore toc; "
+                     (_("%H: call to `%pT' lacks nop, can't restore toc; "
                         "recompile with -fPIC\n"),
                       input_bfd, input_section, rel->r_offset, sym_name);
                  else
                    info->callbacks->einfo
                      /* xgettext:c-format */
-                     (_("%H: call to `%T' lacks nop, can't restore toc; "
+                     (_("%H: call to `%pT' lacks nop, can't restore toc; "
                         "(-mcmodel=small toc adjust stub)\n"),
                       input_bfd, input_section, rel->r_offset, sym_name);
 
@@ -14354,7 +14354,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
        default:
          info->callbacks->einfo
            /* xgettext:c-format */
-           (_("%P: %pB: unknown relocation type %d for `%T'\n"),
+           (_("%P: %pB: unknown relocation type %d for `%pT'\n"),
             input_bfd, (int) r_type, sym_name);
 
          bfd_set_error (bfd_error_bad_value);
@@ -14904,7 +14904,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                          info->callbacks->einfo
                            /* xgettext:c-format */
                            (_("%H: %s for indirect "
-                              "function `%T' unsupported\n"),
+                              "function `%pT' unsupported\n"),
                             input_bfd, input_section, rel->r_offset,
                             ppc64_elf_howto_table[r_type]->name,
                             sym_name);
@@ -15015,7 +15015,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
 
          info->callbacks->einfo
            /* xgettext:c-format */
-           (_("%P: %pB: %s is not supported for `%T'\n"),
+           (_("%P: %pB: %s is not supported for `%pT'\n"),
             input_bfd,
             ppc64_elf_howto_table[r_type]->name, sym_name);
 
@@ -15225,7 +15225,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
        {
          info->callbacks->einfo
            /* xgettext:c-format */
-           (_("%H: unresolvable %s against `%T'\n"),
+           (_("%H: unresolvable %s against `%pT'\n"),
             input_bfd, input_section, rel->r_offset,
             howto->name,
             h->elf.root.root.string);
@@ -15322,7 +15322,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
            {
              info->callbacks->einfo
                /* xgettext:c-format */
-               (_("%H: %s against `%T': error %d\n"),
+               (_("%H: %s against `%pT': error %d\n"),
                 input_bfd, input_section, rel->r_offset,
                 reloc_name, sym_name, (int) r);
              ret = FALSE;
index 22e81d4ccf33015f740d6088f283b26cdb8bef64..9a3ee44e135522a56ed8980f2d68f2ca5c54b8d5 100644 (file)
@@ -1782,7 +1782,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index bcc29e9b3387314be14b1b16476b4f6749122a46..5d95b2e209957e8d90e051c95f8bbaba81f85f67 100644 (file)
@@ -3023,7 +3023,7 @@ _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info,
          || (info->extern_protected_data < 0
              && !get_elf_backend_data (dynbss->owner)->extern_protected_data)))
     info->callbacks->einfo
-      (_("%P: copy reloc against protected `%T' is dangerous\n"),
+      (_("%P: copy reloc against protected `%pT' is dangerous\n"),
        h->root.root.string);
 
   return TRUE;
index 62d41818defad4a50a65b729a69acd0956e4ad57..70fbe9356bf3418670995d927a53fa066254bee8 100644 (file)
@@ -8440,7 +8440,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 711fc1a2d2a51b78baebd95500314f6c3080704c..efbd882f98f97f716b4b78ee567f735fa4336702 100644 (file)
@@ -1109,7 +1109,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 363589d9fc3edfe6b56254f40ca6a00ea23aedcd..143e9a3b6e7edf3f7ae75d6b5f5a0f5ca77d0313 100644 (file)
@@ -2415,7 +2415,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 9295ccd14a8c3a72771016835a453e2e6ae96b46..ab30fddf5232602b4912b26849cc0c6d6d36f7d2 100644 (file)
@@ -2476,7 +2476,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
 
       info->flags |= DF_TEXTREL;
       info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
         sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
index 2398553bd64f19e8719ab28f26237fc9b11ed03e..5f55c948edc55bff8b0ccf52387f1af6163418cb 100644 (file)
@@ -568,7 +568,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *inf)
 
       info->flags |= DF_TEXTREL;
       /* xgettext:c-format */
-      info->callbacks->minfo (_("%pB: dynamic relocation against `%T' "
+      info->callbacks->minfo (_("%pB: dynamic relocation against `%pT' "
                                "in read-only section `%pA'\n"),
                              sec->owner, h->root.root.string, sec);
 
index b1e4143635dab32202ce997575d330240220e45d..a61fd9a6221496c14e394f9a4311fd332c9789e4 100644 (file)
@@ -8307,7 +8307,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
                     message instead.  */
                  link_info->callbacks->einfo
                    /* xgettext:c-format */
-                   (_("%X%P: %pB(%pA): relocation \"%R\" goes out of range\n"),
+                   (_("%X%P: %pB(%pA): relocation \"%pR\" goes out of range\n"),
                     abfd, input_section, * parent);
                  goto error_return;
 
@@ -8317,7 +8317,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
                     Do not abort.  Issue an error message instead.  */
                  link_info->callbacks->einfo
                    /* xgettext:c-format */
-                   (_("%X%P: %pB(%pA): relocation \"%R\" is not supported\n"),
+                   (_("%X%P: %pB(%pA): relocation \"%pR\" is not supported\n"),
                     abfd, input_section, * parent);
                  goto error_return;
 
@@ -8326,7 +8326,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
                     Report unexpected results, without aborting.  */
                  link_info->callbacks->einfo
                    /* xgettext:c-format */
-                   (_("%X%P: %pB(%pA): relocation \"%R\" returns an unrecognized value %x\n"),
+                   (_("%X%P: %pB(%pA): relocation \"%pR\" returns an unrecognized value %x\n"),
                     abfd, input_section, * parent, r);
                  break;
                }
index db07d031565cc3d8bef8750a9baaad0e6846335e..84c6d3e9dd50bbdc3b642298c8db157c91b5efe5 100644 (file)
@@ -1,3 +1,12 @@
+2018-02-19  Alan Modra  <amodra@gmail.com>
+
+       * ldmisc.c (vfinfo) Handle %pI, %pR, %pS and %pT in place of
+       %I, %R, %S and %T.
+       * ldcref.c, * ldctor.c, * ldemul.c, * ldexp.c, * ldgram.y,
+       * ldlang.c, * ldlex.l, * ldmain.c, * ldmisc.c, * pe-dll.c,
+       * emultempl/sh64elf.em: Replace use of of %I, %R, %S and %T in
+       format strings passed to einfo and friends by %pI, %pR, %pS and %pT.
+
 2018-02-19  Alan Modra  <amodra@gmail.com>
 
        * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B.
index 5bfe5b1a24eb16123f08199923877f9a178f5436..7e3f68019d197d6a4df77f3b01a8ae0899eb8196 100644 (file)
@@ -76,7 +76,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void)
                  = bfd_get_section_by_name (f->the_bfd,
                                             SH64_CRANGES_SECTION_NAME);
                if (input_cranges != NULL)
-                 einfo (" %I\n", f);
+                 einfo (" %pI\n", f);
              }
          }
 
@@ -105,7 +105,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void)
                      & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED))
                    {
                      einfo (_("%P: Sorry, turning off relaxing: SHmedia sections present.\n"));
-                     einfo ("  %I\n", f);
+                     einfo ("  %pI\n", f);
                      DISABLE_RELAXATION;
                      goto done_scanning_shmedia_sections;
                    }
index 2b8eb021650c9f78a064991060845de7b57f69dc..ccf7a70c424ebc1f8d6b1e87c0c43c7045b6a3ab 100644 (file)
@@ -410,7 +410,7 @@ output_one_cref (FILE *fp, struct cref_hash_entry *h)
   hl = bfd_link_hash_lookup (link_info.hash, h->root.string, FALSE,
                             FALSE, TRUE);
   if (hl == NULL)
-    einfo (_("%P: symbol `%T' missing from main hash table\n"),
+    einfo (_("%P: symbol `%pT' missing from main hash table\n"),
           h->root.string);
   else
     {
@@ -562,7 +562,7 @@ check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
                             FALSE, TRUE);
   if (hl == NULL)
     {
-      einfo (_("%P: symbol `%T' missing from main hash table\n"),
+      einfo (_("%P: symbol `%pT' missing from main hash table\n"),
             h->root.string);
       return TRUE;
     }
@@ -721,7 +721,7 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
             in OUTSECNAME.  This reloc is from a section which is
             mapped into a section from which references to OUTSECNAME
             are prohibited.  We must report an error.  */
-         einfo (_("%X%C: prohibited cross reference from %s to `%T' in %s\n"),
+         einfo (_("%X%C: prohibited cross reference from %s to `%pT' in %s\n"),
                 abfd, sec, q->address, outsecname,
                 bfd_asymbol_name (*q->sym_ptr_ptr), outdefsecname);
        }
index 8d6e016c728208fe59e8875b33d50cea555696cf..723d01d36f916d4999ffb181260f47f88c233d2c 100644 (file)
@@ -360,7 +360,7 @@ ldctor_build_sets (void)
                }
 
              if (e->name != NULL)
-               minfo ("%T\n", e->name);
+               minfo ("%pT\n", e->name);
              else
                minfo ("%G\n", e->section->owner, e->section, e->value);
            }
index b2262e2b8a860cf88996258c715838e9c5c838f7..6e5b0dee5da72cd347495e1a8d783492ec3d0785 100644 (file)
@@ -271,13 +271,13 @@ set_output_arch_default (void)
 void
 syslib_default (char *ignore ATTRIBUTE_UNUSED)
 {
-  info_msg (_("%S SYSLIB ignored\n"), NULL);
+  info_msg (_("%pS SYSLIB ignored\n"), NULL);
 }
 
 void
 hll_default (char *ignore ATTRIBUTE_UNUSED)
 {
-  info_msg (_("%S HLL ignored\n"), NULL);
+  info_msg (_("%pS HLL ignored\n"), NULL);
 }
 
 ld_emulation_xfer_type *ld_emulations[] = { EMULATION_LIST };
index 6d1cacac512d6e2e23544786cb6b0b62d6441274..a44a4fe05422353ec3a4d3ca833f2680115f676e 100644 (file)
@@ -624,7 +624,7 @@ fold_binary (etree_type *tree)
            expld.result.value = ((bfd_signed_vma) lhs.value
                                  % (bfd_signed_vma) expld.result.value);
          else if (expld.phase != lang_mark_phase_enum)
-           einfo (_("%F%S %% by zero\n"), tree->binary.rhs);
+           einfo (_("%F%pS %% by zero\n"), tree->binary.rhs);
          arith_result_section (&lhs);
          break;
 
@@ -633,7 +633,7 @@ fold_binary (etree_type *tree)
            expld.result.value = ((bfd_signed_vma) lhs.value
                                  / (bfd_signed_vma) expld.result.value);
          else if (expld.phase != lang_mark_phase_enum)
-           einfo (_("%F%S / by zero\n"), tree->binary.rhs);
+           einfo (_("%F%pS / by zero\n"), tree->binary.rhs);
          arith_result_section (&lhs);
          break;
 
@@ -754,7 +754,7 @@ fold_name (etree_type *tree)
                  if (expld.phase <= lang_mark_phase_enum)
                    new_rel (h->u.def.value, h->u.def.section);
                  else
-                   einfo (_("%X%S: unresolvable symbol `%s'"
+                   einfo (_("%X%pS: unresolvable symbol `%s'"
                             " referenced in expression\n"),
                           tree, tree->name.name);
                }
@@ -769,7 +769,7 @@ fold_name (etree_type *tree)
          else if (expld.phase == lang_final_phase_enum
                   || (expld.phase != lang_mark_phase_enum
                       && expld.assigning_to_dot))
-           einfo (_("%F%S: undefined symbol `%s'"
+           einfo (_("%F%pS: undefined symbol `%s'"
                     " referenced in expression\n"),
                   tree, tree->name.name);
          else if (h->type == bfd_link_hash_new)
@@ -795,7 +795,7 @@ fold_name (etree_type *tree)
          if (os == NULL)
            {
              if (expld.phase == lang_final_phase_enum)
-               einfo (_("%F%S: undefined section `%s'"
+               einfo (_("%F%pS: undefined section `%s'"
                         " referenced in expression\n"),
                       tree, tree->name.name);
            }
@@ -813,7 +813,7 @@ fold_name (etree_type *tree)
          if (os == NULL)
            {
              if (expld.phase == lang_final_phase_enum)
-               einfo (_("%F%S: undefined section `%s'"
+               einfo (_("%F%pS: undefined section `%s'"
                         " referenced in expression\n"),
                       tree, tree->name.name);
            }
@@ -841,7 +841,7 @@ fold_name (etree_type *tree)
          if (os == NULL)
            {
              if (expld.phase == lang_final_phase_enum)
-               einfo (_("%F%S: undefined section `%s'"
+               einfo (_("%F%pS: undefined section `%s'"
                         " referenced in expression\n"),
                       tree, tree->name.name);
              new_number (0);
@@ -873,7 +873,7 @@ fold_name (etree_type *tree)
          if (mem != NULL)
            new_number (mem->length);
          else
-           einfo (_("%F%S: undefined MEMORY region `%s'"
+           einfo (_("%F%pS: undefined MEMORY region `%s'"
                     " referenced in expression\n"),
                   tree, tree->name.name);
        }
@@ -889,7 +889,7 @@ fold_name (etree_type *tree)
          if (mem != NULL)
            new_rel_from_abs (mem->origin);
          else
-           einfo (_("%F%S: undefined MEMORY region `%s'"
+           einfo (_("%F%pS: undefined MEMORY region `%s'"
                     " referenced in expression\n"),
                   tree, tree->name.name);
        }
@@ -901,7 +901,7 @@ fold_name (etree_type *tree)
       else if (strcmp (tree->name.name, "COMMONPAGESIZE") == 0)
        new_number (config.commonpagesize);
       else
-       einfo (_("%F%S: unknown constant `%s' referenced in expression\n"),
+       einfo (_("%F%pS: unknown constant `%s' referenced in expression\n"),
               tree, tree->name.name);
       break;
 
@@ -1049,7 +1049,7 @@ exp_fold_tree_1 (etree_type *tree)
       if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0)
        {
          if (tree->type.node_class != etree_assign)
-           einfo (_("%F%S can not PROVIDE assignment to"
+           einfo (_("%F%pS can not PROVIDE assignment to"
                     " location counter\n"), tree);
          if (expld.phase != lang_first_phase_enum)
            {
@@ -1082,11 +1082,11 @@ exp_fold_tree_1 (etree_type *tree)
                  || expld.section == bfd_und_section_ptr)
                {
                  if (expld.phase != lang_mark_phase_enum)
-                   einfo (_("%F%S invalid assignment to"
+                   einfo (_("%F%pS invalid assignment to"
                             " location counter\n"), tree);
                }
              else if (expld.dotp == NULL)
-               einfo (_("%F%S assignment to location counter"
+               einfo (_("%F%pS assignment to location counter"
                         " invalid outside of SECTIONS\n"), tree);
 
              /* After allocation, assignment to dot should not be
@@ -1105,7 +1105,7 @@ exp_fold_tree_1 (etree_type *tree)
                    nextdot += expld.section->vma;
                  if (nextdot < expld.dot
                      && expld.section != bfd_abs_section_ptr)
-                   einfo (_("%F%S cannot move location counter backwards"
+                   einfo (_("%F%pS cannot move location counter backwards"
                             " (from %V to %V)\n"),
                           tree, expld.dot, nextdot);
                  else
@@ -1513,7 +1513,7 @@ exp_get_vma (etree_type *tree, bfd_vma def, char *name)
       if (expld.result.valid_p)
        return expld.result.value;
       else if (name != NULL && expld.phase != lang_mark_phase_enum)
-       einfo (_("%F%S: nonconstant expression for %s\n"),
+       einfo (_("%F%pS: nonconstant expression for %s\n"),
               tree, name);
     }
   return def;
@@ -1539,7 +1539,7 @@ exp_get_fill (etree_type *tree, fill_type *def, char *name)
   if (!expld.result.valid_p)
     {
       if (name != NULL && expld.phase != lang_mark_phase_enum)
-       einfo (_("%F%S: nonconstant expression for %s\n"),
+       einfo (_("%F%pS: nonconstant expression for %s\n"),
               tree, name);
       return def;
     }
@@ -1599,7 +1599,7 @@ exp_get_abs_int (etree_type *tree, int def, char *name)
        }
       else if (name != NULL && expld.phase != lang_mark_phase_enum)
        {
-         einfo (_("%F%S: nonconstant expression for %s\n"),
+         einfo (_("%F%pS: nonconstant expression for %s\n"),
                 tree, name);
        }
     }
index ba89a4fe3a7590ee57f42fbcfacabc989e2519df..335624b386cca3e3d73c65885562508a823375d0 100644 (file)
@@ -1244,7 +1244,7 @@ phdr_type:
                          else
                            {
                              einfo (_("\
-%X%P:%S: unknown phdr type `%s' (try integer literal)\n"),
+%X%P:%pS: unknown phdr type `%s' (try integer literal)\n"),
                                     NULL, s);
                              $$ = exp_intop (0);
                            }
@@ -1268,7 +1268,7 @@ phdr_qualifiers:
                  else if (strcmp ($1, "FLAGS") == 0 && $2 != NULL)
                    $$.flags = $2;
                  else
-                   einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"),
+                   einfo (_("%X%P:%pS: PHDRS syntax error at `%s'\n"),
                           NULL, $1);
                }
        |       AT '(' exp ')' phdr_qualifiers
@@ -1477,7 +1477,7 @@ yyerror(arg)
     einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
           ldlex_filename ());
   if (error_index > 0 && error_index < ERROR_NAME_MAX)
-    einfo ("%P%F:%S: %s in %s\n", NULL, arg, error_names[error_index - 1]);
+    einfo ("%P%F:%pS: %s in %s\n", NULL, arg, error_names[error_index - 1]);
   else
-    einfo ("%P%F:%S: %s\n", NULL, arg);
+    einfo ("%P%F:%pS: %s\n", NULL, arg);
 }
index 2581a774f30117893401e12cbfed94ca328067eb..1a6f2cf6c1fb519bb20a47fd8eeda296c293f8d9 100644 (file)
@@ -1315,13 +1315,13 @@ lang_memory_region_lookup (const char *const name, bfd_boolean create)
       if (strcmp (n->name, name) == 0)
        {
          if (create)
-           einfo (_("%P:%S: warning: redeclaration of memory region `%s'\n"),
+           einfo (_("%P:%pS: warning: redeclaration of memory region `%s'\n"),
                   NULL, name);
          return r;
        }
 
   if (!create && strcmp (name, DEFAULT_MEMORY_REGION))
-    einfo (_("%P:%S: warning: memory region `%s' not declared\n"),
+    einfo (_("%P:%pS: warning: memory region `%s' not declared\n"),
           NULL, name);
 
   new_region = (lang_memory_region_type *)
@@ -1358,7 +1358,7 @@ lang_memory_region_alias (const char *alias, const char *region_name)
      the default memory region.  */
   if (strcmp (region_name, DEFAULT_MEMORY_REGION) == 0
       || strcmp (alias, DEFAULT_MEMORY_REGION) == 0)
-    einfo (_("%F%P:%S: error: alias for default memory region\n"), NULL);
+    einfo (_("%F%P:%pS: error: alias for default memory region\n"), NULL);
 
   /* Look for the target region and check if the alias is not already
      in use.  */
@@ -1369,14 +1369,14 @@ lang_memory_region_alias (const char *alias, const char *region_name)
        if (region == NULL && strcmp (n->name, region_name) == 0)
          region = r;
        if (strcmp (n->name, alias) == 0)
-         einfo (_("%F%P:%S: error: redefinition of memory region "
+         einfo (_("%F%P:%pS: error: redefinition of memory region "
                   "alias `%s'\n"),
                 NULL, alias);
       }
 
   /* Check if the target region exists.  */
   if (region == NULL)
-    einfo (_("%F%P:%S: error: memory region `%s' "
+    einfo (_("%F%P:%pS: error: memory region `%s' "
             "for alias `%s' does not exist\n"),
           NULL, region_name, alias);
 
@@ -2017,7 +2017,7 @@ lang_print_asneeded (void)
 
       if (m->ref != NULL)
        minfo ("%pB ", m->ref);
-      minfo ("(%T)\n", m->name);
+      minfo ("(%pT)\n", m->name);
     }
 }
 
@@ -2829,7 +2829,7 @@ load_symbols (lang_input_statement_type *entry,
       if (!entry->flags.reload)
        ldlang_add_file (entry);
       if (trace_files || verbose)
-       info_msg ("%I\n", entry);
+       info_msg ("%pI\n", entry);
       break;
 
     case bfd_archive:
@@ -4142,7 +4142,7 @@ print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
              + hash_entry->u.def.section->output_offset
              + hash_entry->u.def.section->output_section->vma));
 
-      minfo ("             %T\n", hash_entry->root.string);
+      minfo ("             %pT\n", hash_entry->root.string);
     }
 
   return TRUE;
@@ -5047,7 +5047,7 @@ lang_size_sections_1
                      dot += expld.result.section->vma;
                  }
                else if (expld.phase != lang_mark_phase_enum)
-                 einfo (_("%F%S: non constant or forward reference"
+                 einfo (_("%F%pS: non constant or forward reference"
                           " address expression for section %s\n"),
                         os->addr_tree, os->name);
              }
@@ -6393,7 +6393,7 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
 
   section = h->u.c.p->section;
   if (!bfd_define_common_symbol (link_info.output_bfd, &link_info, h))
-    einfo (_("%P%F: Could not define common symbol `%T': %E\n"),
+    einfo (_("%P%F: Could not define common symbol `%pT': %E\n"),
           h->root.string);
 
   if (config.map_file != NULL)
@@ -6716,7 +6716,7 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
 
   os->align_lma_with_input = align_with_input == ALIGN_WITH_INPUT;
   if (os->align_lma_with_input && align != NULL)
-    einfo (_("%F%P:%S: error: align with input and explicit align specified\n"),
+    einfo (_("%F%P:%pS: error: align with input and explicit align specified\n"),
           NULL);
 
   os->subsection_alignment =
@@ -7637,7 +7637,7 @@ lang_get_regions (lang_memory_region_type **region,
     *region = lang_memory_region_lookup (memspec, FALSE);
 
   if (have_lma && lma_memspec != 0)
-    einfo (_("%X%P:%S: section has both a load address and a load region\n"),
+    einfo (_("%X%P:%pS: section has both a load address and a load region\n"),
           NULL);
 }
 
@@ -7752,7 +7752,7 @@ lang_new_phdr (const char *name,
        && (*pp)->type == 1
        && !((*pp)->filehdr || (*pp)->phdrs))
       {
-       einfo (_("%X%P:%S: PHDRS and FILEHDR are not supported"
+       einfo (_("%X%P:%pS: PHDRS and FILEHDR are not supported"
                 " when prior PT_LOAD headers lack them\n"), NULL);
        hdrs = FALSE;
       }
index 2f59d79d12cabaf52a9cc94acf480ba57aa62490..261c0c1c0fff5efc2a6aad041282e4c14592f0f6 100644 (file)
@@ -729,5 +729,5 @@ lex_warn_invalid (char *where, char *what)
       what = buf;
     }
 
-  einfo (_("%P:%S: ignoring invalid character `%s'%s\n"), NULL, what, where);
+  einfo (_("%P:%pS: ignoring invalid character `%s'%s\n"), NULL, what, where);
 }
index d23c6d1a1ed9f3a2c71f108c03f6b0cfb4786734..6945654c2837b6d8916d2a9390f14d9533ccc65b 100644 (file)
@@ -823,7 +823,7 @@ add_archive_element (struct bfd_link_info *info,
              /* Don't claim new IR symbols after all IR symbols have
                 been claimed.  */
              if (trace_files || verbose)
-               info_msg ("%I: no new IR symbols to claimi\n",
+               info_msg ("%pI: no new IR symbols to claimi\n",
                          &orig_input);
              input->flags.claimed = 0;
              return FALSE;
@@ -906,13 +906,13 @@ add_archive_element (struct bfd_link_info *info,
       if (from != NULL)
        minfo ("%pB ", from);
       if (h != NULL)
-       minfo ("(%T)\n", h->root.string);
+       minfo ("(%pT)\n", h->root.string);
       else
        minfo ("(%s)\n", name);
     }
 
   if (trace_files || verbose)
-    info_msg ("%I\n", &orig_input);
+    info_msg ("%pI\n", &orig_input);
   return TRUE;
 }
 
@@ -979,7 +979,7 @@ multiple_definition (struct bfd_link_info *info,
       nval = oval;
       obfd = NULL;
     }
-  einfo (_("%X%C: multiple definition of `%T'\n"),
+  einfo (_("%X%C: multiple definition of `%pT'\n"),
         nbfd, nsec, nval, name);
   if (obfd != NULL)
     einfo (_("%D: first defined here\n"), obfd, osec, oval);
@@ -1038,7 +1038,7 @@ multiple_common (struct bfd_link_info *info ATTRIBUTE_UNUSED,
       || ntype == bfd_link_hash_indirect)
     {
       ASSERT (otype == bfd_link_hash_common);
-      einfo (_("%pB: warning: definition of `%T' overriding common\n"),
+      einfo (_("%pB: warning: definition of `%pT' overriding common\n"),
             nbfd, name);
       if (obfd != NULL)
        einfo (_("%pB: warning: common is here\n"), obfd);
@@ -1048,7 +1048,7 @@ multiple_common (struct bfd_link_info *info ATTRIBUTE_UNUSED,
           || otype == bfd_link_hash_indirect)
     {
       ASSERT (ntype == bfd_link_hash_common);
-      einfo (_("%pB: warning: common of `%T' overridden by definition\n"),
+      einfo (_("%pB: warning: common of `%pT' overridden by definition\n"),
             nbfd, name);
       if (obfd != NULL)
        einfo (_("%pB: warning: defined here\n"), obfd);
@@ -1058,21 +1058,21 @@ multiple_common (struct bfd_link_info *info ATTRIBUTE_UNUSED,
       ASSERT (otype == bfd_link_hash_common && ntype == bfd_link_hash_common);
       if (osize > nsize)
        {
-         einfo (_("%pB: warning: common of `%T' overridden by larger common\n"),
+         einfo (_("%pB: warning: common of `%pT' overridden by larger common\n"),
                 nbfd, name);
          if (obfd != NULL)
            einfo (_("%pB: warning: larger common is here\n"), obfd);
        }
       else if (nsize > osize)
        {
-         einfo (_("%pB: warning: common of `%T' overriding smaller common\n"),
+         einfo (_("%pB: warning: common of `%pT' overriding smaller common\n"),
                 nbfd, name);
          if (obfd != NULL)
            einfo (_("%pB: warning: smaller common is here\n"), obfd);
        }
       else
        {
-         einfo (_("%pB: warning: multiple common of `%T'\n"), nbfd, name);
+         einfo (_("%pB: warning: multiple common of `%pT'\n"), nbfd, name);
          if (obfd != NULL)
            einfo (_("%pB: warning: previous common is here\n"), obfd);
        }
@@ -1318,19 +1318,19 @@ undefined_symbol (struct bfd_link_info *info,
       if (error_count < MAX_ERRORS_IN_A_ROW)
        {
          if (error)
-           einfo (_("%X%C: undefined reference to `%T'\n"),
+           einfo (_("%X%C: undefined reference to `%pT'\n"),
                   abfd, section, address, name);
          else
-           einfo (_("%C: warning: undefined reference to `%T'\n"),
+           einfo (_("%C: warning: undefined reference to `%pT'\n"),
                   abfd, section, address, name);
        }
       else if (error_count == MAX_ERRORS_IN_A_ROW)
        {
          if (error)
-           einfo (_("%X%D: more undefined references to `%T' follow\n"),
+           einfo (_("%X%D: more undefined references to `%pT' follow\n"),
                   abfd, section, address, name);
          else
-           einfo (_("%D: warning: more undefined references to `%T' follow\n"),
+           einfo (_("%D: warning: more undefined references to `%pT' follow\n"),
                   abfd, section, address, name);
        }
       else if (error)
@@ -1341,19 +1341,19 @@ undefined_symbol (struct bfd_link_info *info,
       if (error_count < MAX_ERRORS_IN_A_ROW)
        {
          if (error)
-           einfo (_("%X%pB: undefined reference to `%T'\n"),
+           einfo (_("%X%pB: undefined reference to `%pT'\n"),
                   abfd, name);
          else
-           einfo (_("%pB: warning: undefined reference to `%T'\n"),
+           einfo (_("%pB: warning: undefined reference to `%pT'\n"),
                   abfd, name);
        }
       else if (error_count == MAX_ERRORS_IN_A_ROW)
        {
          if (error)
-           einfo (_("%X%pB: more undefined references to `%T' follow\n"),
+           einfo (_("%X%pB: more undefined references to `%pT' follow\n"),
                   abfd, name);
          else
-           einfo (_("%pB: warning: more undefined references to `%T' follow\n"),
+           einfo (_("%pB: warning: more undefined references to `%pT' follow\n"),
                   abfd, name);
        }
       else if (error)
@@ -1404,13 +1404,13 @@ reloc_overflow (struct bfd_link_info *info,
        case bfd_link_hash_undefined:
        case bfd_link_hash_undefweak:
          einfo (_(" relocation truncated to fit: "
-                  "%s against undefined symbol `%T'"),
+                  "%s against undefined symbol `%pT'"),
                 reloc_name, entry->root.string);
          break;
        case bfd_link_hash_defined:
        case bfd_link_hash_defweak:
          einfo (_(" relocation truncated to fit: "
-                  "%s against symbol `%T' defined in %pA section in %pB"),
+                  "%s against symbol `%pT' defined in %pA section in %pB"),
                 reloc_name, entry->root.string,
                 entry->u.def.section,
                 entry->u.def.section == bfd_abs_section_ptr
@@ -1422,7 +1422,7 @@ reloc_overflow (struct bfd_link_info *info,
        }
     }
   else
-    einfo (_(" relocation truncated to fit: %s against `%T'"),
+    einfo (_(" relocation truncated to fit: %s against `%pT'"),
           reloc_name, name);
   if (addend != 0)
     einfo ("+%v", addend);
@@ -1452,7 +1452,7 @@ unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
                  asection *section,
                  bfd_vma address)
 {
-  einfo (_("%X%H: reloc refers to symbol `%T' which is not being output\n"),
+  einfo (_("%X%H: reloc refers to symbol `%pT' which is not being output\n"),
         abfd, section, address, name);
 }
 
index e3fdac3c0e35435f357f61332da67adc9de4c7c2..d2011510e2ac28c4bc44065ec26ddd4eac2c89fc 100644 (file)
  %F error is fatal
  %G like %D, but only function name
  %H like %C but in addition emit section+offset
- %I filename from a lang_input_statement_type
  %P print program name
- %R info about a relent
- %S print script file and linenumber from etree_type.
- %T symbol name
  %V hex bfd_vma
  %W hex bfd_vma with 0x with no leading zeros taking up 8 spaces
  %X no object output, fail return
  %p native (host) void* pointer, like printf
  %pA section name from a section
  %pB filename from a bfd
+ %pI filename from a lang_input_statement_type
+ %pR info about a relent
+ %pS print script file and linenumber from etree_type.
+ %pT symbol name
  %s arbitrary string, like printf
  %u integer, like printf
  %v hex bfd_vma, no leading zeros
@@ -129,16 +129,13 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
              arg_type = Vma;
              break;
 
-           case 'T':
-           case 'I':
-           case 'S':
-           case 'R':
            case 's':
              arg_type = Ptr;
              break;
 
            case 'p':
-             if (*scan == 'A' || *scan == 'B')
+             if (*scan == 'A' || *scan == 'B' || *scan == 'I'
+                 || *scan == 'R' || *scan == 'S' || *scan ==  'T')
                scan++;
              arg_type = Ptr;
              break;
@@ -292,33 +289,6 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
              }
              break;
 
-           case 'T':
-             /* Symbol name.  */
-             {
-               const char *name = (const char *) args[arg_no].p;
-               ++arg_count;
-               if (name == NULL || *name == 0)
-                 {
-                   fprintf (fp, _("no symbol"));
-                   break;
-                 }
-               else if (demangling)
-                 {
-                   char *demangled;
-
-                   demangled = bfd_demangle (link_info.output_bfd, name,
-                                             DMGL_ANSI | DMGL_PARAMS);
-                   if (demangled != NULL)
-                     {
-                       fprintf (fp, "%s", demangled);
-                       free (demangled);
-                       break;
-                     }
-                 }
-               fprintf (fp, "%s", name);
-             }
-             break;
-
            case 'F':
              /* Error is fatal.  */
              fatal = TRUE;
@@ -334,54 +304,6 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
              fprintf (fp, "%s", bfd_errmsg (bfd_get_error ()));
              break;
 
-           case 'I':
-             /* filename from a lang_input_statement_type */
-             {
-               lang_input_statement_type *i;
-
-               i = (lang_input_statement_type *) args[arg_no].p;
-               ++arg_count;
-               if (i->the_bfd->my_archive != NULL
-                   && !bfd_is_thin_archive (i->the_bfd->my_archive))
-                 fprintf (fp, "(%s)",
-                          bfd_get_filename (i->the_bfd->my_archive));
-               fprintf (fp, "%s", i->local_sym_name);
-               if ((i->the_bfd->my_archive == NULL
-                    || bfd_is_thin_archive (i->the_bfd->my_archive))
-                   && filename_cmp (i->local_sym_name, i->filename) != 0)
-                 fprintf (fp, " (%s)", i->filename);
-             }
-             break;
-
-           case 'S':
-             /* Print script file and linenumber.  */
-             {
-               etree_type node;
-               etree_type *tp = (etree_type *) args[arg_no].p;
-               ++arg_count;
-               if (tp == NULL)
-                 {
-                   tp = &node;
-                   tp->type.filename = ldlex_filename ();
-                   tp->type.lineno = lineno;
-                 }
-               if (tp->type.filename != NULL)
-                 fprintf (fp, "%s:%u", tp->type.filename, tp->type.lineno);
-             }
-             break;
-
-           case 'R':
-             /* Print all that's interesting about a relent.  */
-             {
-               arelent *relent = (arelent *) args[arg_no].p;
-               ++arg_count;
-               lfinfo (fp, "%s+0x%v (type %s)",
-                       (*(relent->sym_ptr_ptr))->name,
-                       relent->addend,
-                       relent->howto->name);
-             }
-             break;
-
            case 'C':
            case 'D':
            case 'G':
@@ -449,7 +371,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
                                && filename_cmp (last_file, filename) != 0)
                            || strcmp (last_function, functionname) != 0)
                          {
-                           lfinfo (fp, _("%pB: In function `%T':\n"),
+                           lfinfo (fp, _("%pB: In function `%pT':\n"),
                                    abfd, functionname);
 
                            last_bfd = abfd;
@@ -472,7 +394,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
 
                    done = fmt[-1] != 'H';
                    if (functionname != NULL && fmt[-1] == 'G')
-                     lfinfo (fp, "%T", functionname);
+                     lfinfo (fp, "%pT", functionname);
                    else if (filename != NULL && linenumber != 0)
                      fprintf (fp, "%u%s", linenumber, done ? "" : ":");
                    else
@@ -546,6 +468,80 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
                  else
                    fprintf (fp, "%s", abfd->filename);
                }
+             else if (*fmt == 'I')
+               {
+                 /* filename from a lang_input_statement_type */
+                 lang_input_statement_type *i;
+
+                 fmt++;
+                 i = (lang_input_statement_type *) args[arg_no].p;
+                 ++arg_count;
+                 if (i->the_bfd->my_archive != NULL
+                     && !bfd_is_thin_archive (i->the_bfd->my_archive))
+                   fprintf (fp, "(%s)",
+                            bfd_get_filename (i->the_bfd->my_archive));
+                 fprintf (fp, "%s", i->local_sym_name);
+                 if ((i->the_bfd->my_archive == NULL
+                      || bfd_is_thin_archive (i->the_bfd->my_archive))
+                     && filename_cmp (i->local_sym_name, i->filename) != 0)
+                   fprintf (fp, " (%s)", i->filename);
+               }
+             else if (*fmt == 'R')
+               {
+                 /* Print all that's interesting about a relent.  */
+                 arelent *relent = (arelent *) args[arg_no].p;
+
+                 fmt++;
+                 ++arg_count;
+                 lfinfo (fp, "%s+0x%v (type %s)",
+                         (*(relent->sym_ptr_ptr))->name,
+                         relent->addend,
+                         relent->howto->name);
+               }
+             else if (*fmt == 'S')
+               {
+                 /* Print script file and linenumber.  */
+                 etree_type node;
+                 etree_type *tp = (etree_type *) args[arg_no].p;
+
+                 fmt++;
+                 ++arg_count;
+                 if (tp == NULL)
+                   {
+                     tp = &node;
+                     tp->type.filename = ldlex_filename ();
+                     tp->type.lineno = lineno;
+                   }
+                 if (tp->type.filename != NULL)
+                   fprintf (fp, "%s:%u", tp->type.filename, tp->type.lineno);
+               }
+             else if (*fmt == 'T')
+               {
+                 /* Symbol name.  */
+                 const char *name = (const char *) args[arg_no].p;
+
+                 fmt++;
+                 ++arg_count;
+                 if (name == NULL || *name == 0)
+                   {
+                     fprintf (fp, _("no symbol"));
+                     break;
+                   }
+                 else if (demangling)
+                   {
+                     char *demangled;
+
+                     demangled = bfd_demangle (link_info.output_bfd, name,
+                                               DMGL_ANSI | DMGL_PARAMS);
+                     if (demangled != NULL)
+                       {
+                         fprintf (fp, "%s", demangled);
+                         free (demangled);
+                         break;
+                       }
+                   }
+                 fprintf (fp, "%s", name);
+               }
              else
                {
                  /* native (host) void* pointer, like printf */
index d1bd32c4c70ba4affc70df275e62f65d8148e547..5f110055d09461880b312cbf8684721a1b61ddda 100644 (file)
@@ -2701,7 +2701,7 @@ pe_create_import_fixup (arelent *rel, asection *s, bfd_vma addend, char *name)
       runtime_pseudo_relocs_created++;
     }
   else if (addend != 0)
-    einfo (_("%P%X%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
+    einfo (_("%P%X%C: variable '%pT' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
           s->owner, s, rel->address, sym->name);
 }