public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] ld: Use %E in einfo in pdb.c
@ 2022-10-31  0:15 Mark Harmstone
  2022-10-31  0:15 ` [PATCH v2 2/3] ld: Add section header stream to PDB files Mark Harmstone
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Harmstone @ 2022-10-31  0:15 UTC (permalink / raw)
  To: binutils; +Cc: Mark Harmstone

Resubmission, taking into account
https://sourceware.org/pipermail/binutils/2022-October/123948.html.

---
 ld/pdb.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/ld/pdb.c b/ld/pdb.c
index 3452e2cbe5b..80ed31e257a 100644
--- a/ld/pdb.c
+++ b/ld/pdb.c
@@ -444,8 +444,7 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid)
   pdb = bfd_openw (pdb_name, "pdb");
   if (!pdb)
     {
-      einfo (_("%P: warning: cannot create PDB file: %s\n"),
-	     bfd_errmsg (bfd_get_error ()));
+      einfo (_("%P: warning: cannot create PDB file: %E\n"));
       return false;
     }
 
@@ -454,7 +453,7 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid)
   if (!create_old_directory_stream (pdb))
     {
       einfo (_("%P: warning: cannot create old directory stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
@@ -463,14 +462,14 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid)
   if (!info_stream)
     {
       einfo (_("%P: warning: cannot create info stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
   if (!create_type_stream (pdb))
     {
       einfo (_("%P: warning: cannot create TPI stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
@@ -479,14 +478,14 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid)
   if (!dbi_stream)
     {
       einfo (_("%P: warning: cannot create DBI stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
   if (!create_type_stream (pdb))
     {
       einfo (_("%P: warning: cannot create IPI stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
@@ -495,21 +494,21 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid)
   if (!names_stream)
     {
       einfo (_("%P: warning: cannot create /names stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
   if (!populate_dbi_stream (dbi_stream, abfd))
     {
       einfo (_("%P: warning: cannot populate DBI stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
   if (!populate_info_stream (pdb, info_stream, guid))
     {
       einfo (_("%P: warning: cannot populate info stream "
-	       "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ()));
+	       "in PDB file: %E\n"));
       goto end;
     }
 
-- 
2.37.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-31  3:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31  0:15 [PATCH v2 1/3] ld: Use %E in einfo in pdb.c Mark Harmstone
2022-10-31  0:15 ` [PATCH v2 2/3] ld: Add section header stream to PDB files Mark Harmstone
2022-10-31  0:15 ` [PATCH v2 3/3] ld: Add publics " Mark Harmstone
2022-10-31  3:43 ` [PATCH v2 1/3] ld: Use %E in einfo in pdb.c Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).