This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Use %pI, %pR, %pS, %pT in place of %I, %R, %S and %T.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c1c8c1ef9acdeddf719f358b91590545440cea68

commit c1c8c1ef9acdeddf719f358b91590545440cea68
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Feb 19 18:30:41 2018 +1030

    Use %pI, %pR, %pS, %pT in place of %I, %R, %S and %T.
    
    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.

Diff:
---
 bfd/ChangeLog           |  10 +++
 bfd/elf32-arm.c         |   2 +-
 bfd/elf32-hppa.c        |   2 +-
 bfd/elf32-lm32.c        |   2 +-
 bfd/elf32-m32r.c        |   2 +-
 bfd/elf32-metag.c       |   2 +-
 bfd/elf32-nds32.c       |   4 +-
 bfd/elf32-or1k.c        |   2 +-
 bfd/elf32-ppc.c         |   2 +-
 bfd/elf32-s390.c        |   2 +-
 bfd/elf32-sh.c          |   2 +-
 bfd/elf32-tic6x.c       |   2 +-
 bfd/elf32-tilepro.c     |   2 +-
 bfd/elf64-ppc.c         |  30 ++++-----
 bfd/elf64-s390.c        |   2 +-
 bfd/elflink.c           |   2 +-
 bfd/elfnn-aarch64.c     |   2 +-
 bfd/elfnn-riscv.c       |   2 +-
 bfd/elfxx-sparc.c       |   2 +-
 bfd/elfxx-tilegx.c      |   2 +-
 bfd/elfxx-x86.c         |   2 +-
 bfd/reloc.c             |   6 +-
 ld/ChangeLog            |   9 +++
 ld/emultempl/sh64elf.em |   4 +-
 ld/ldcref.c             |   6 +-
 ld/ldctor.c             |   2 +-
 ld/ldemul.c             |   4 +-
 ld/ldexp.c              |  34 +++++-----
 ld/ldgram.y             |   8 +--
 ld/ldlang.c             |  26 ++++----
 ld/ldlex.l              |   2 +-
 ld/ldmain.c             |  42 ++++++------
 ld/ldmisc.c             | 168 +++++++++++++++++++++++-------------------------
 ld/pe-dll.c             |   2 +-
 34 files changed, 204 insertions(+), 189 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7275105..2a6eeb6 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,15 @@
 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
 	of %A and %B.
 	* aout-adobe.c: Update all messages using %A and %B.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index badf82e..6109dab 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -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.  */
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 84394e5..f4f1297 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -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.  */
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index 192c712..6269775 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -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.  */
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index da540b9..985047e 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -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.  */
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index 9de08b3..dc867ce 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -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.  */
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index 3ca6f51..70cf1dc 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -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;
 
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index 67e5769..e630a45 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -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.  */
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 1cacb79..c9db21c 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -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.  */
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index f82b227..3ddbd469 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -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.  */
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 5c80ab4..7c8ec6c 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -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.  */
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index 04be4b3..24920b0 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -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.  */
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 1b75262..442e582 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -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.  */
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index b6c6105..f8b6629 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -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;
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 22e81d4..9a3ee44 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -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.  */
diff --git a/bfd/elflink.c b/bfd/elflink.c
index bcc29e9..5d95b2e 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -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;
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 62d4181..70fbe93 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -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.  */
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 711fc1a..efbd882 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -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.  */
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 363589d..143e9a3 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -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.  */
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index 9295ccd..ab30fdd 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -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.  */
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 2398553..5f55c94 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -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);
 
diff --git a/bfd/reloc.c b/bfd/reloc.c
index b1e4143..a61fd9a 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -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;
 		}
diff --git a/ld/ChangeLog b/ld/ChangeLog
index db07d03..84c6d3e 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,14 @@
 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.
 	* ldcref.c: Update all messages using %A and %B.
 	* ldexp.c: Likewise.
diff --git a/ld/emultempl/sh64elf.em b/ld/emultempl/sh64elf.em
index 5bfe5b1..7e3f680 100644
--- a/ld/emultempl/sh64elf.em
+++ b/ld/emultempl/sh64elf.em
@@ -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;
 		    }
diff --git a/ld/ldcref.c b/ld/ldcref.c
index 2b8eb02..ccf7a70 100644
--- a/ld/ldcref.c
+++ b/ld/ldcref.c
@@ -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);
 	}
diff --git a/ld/ldctor.c b/ld/ldctor.c
index 8d6e016..723d01d 100644
--- a/ld/ldctor.c
+++ b/ld/ldctor.c
@@ -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);
 	    }
diff --git a/ld/ldemul.c b/ld/ldemul.c
index b2262e2..6e5b0de 100644
--- a/ld/ldemul.c
+++ b/ld/ldemul.c
@@ -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 };
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 6d1caca..a44a4fe 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -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);
 	}
     }
diff --git a/ld/ldgram.y b/ld/ldgram.y
index ba89a4f..335624b 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -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);
 }
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 2581a77..1a6f2cf 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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;
       }
diff --git a/ld/ldlex.l b/ld/ldlex.l
index 2f59d79..261c0c1 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -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);
 }
diff --git a/ld/ldmain.c b/ld/ldmain.c
index d23c6d1..6945654 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -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);
 }
 
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index e3fdac3..d201151 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -46,11 +46,7 @@
  %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
@@ -60,6 +56,10 @@
  %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 */
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index d1bd32c..5f11005 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -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);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]