binutils, ld: dequote libctf error messages
authorNick Alcock <nick.alcock@oracle.com>
Wed, 29 Jul 2020 12:50:10 +0000 (13:50 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 27 Aug 2020 12:16:39 +0000 (13:16 +0100)
These are not identifiers and should not be quoted.  (Also, quoting them
just looks odd.)

Adjust diagnostics tests accordingly.

binutils/ChangeLog
2020-08-27  Nick Alcock  <nick.alcock@oracle.com>

* objdump.c (dump_ctf_errs): Unquote CTF error messages.
* readelf.c (dump_ctf_errs): Likewise.

ld/ChangeLog
2020-08-27  Nick Alcock  <nick.alcock@oracle.com>

* ldlang.c (dump_ctf_errs): Unquote CTF error messages.
(ldlang_open_ctf): Likewise.
(lang_merge_ctf): Likewise.
(lang_write_ctf): Likewise.
* testsuite/ld-ctf/diag-ctf-version-f.d: Adjust.
* testsuite/ld-ctf/diag-cttname-invalid.d: Adjust.
* testsuite/ld-ctf/diag-decompression-failure.d: Adjust.
* testsuite/ld-ctf/diag-parname.d: Adjust.
* testsuite/ld-ctf/diag-unsupported-flag.d: Adjust.
* testsuite/ld-ctf/diag-wrong-magic-number-mixed.d: Adjust.
* testsuite/ld-ctf/diag-wrong-magic-number.d: Adjust.

12 files changed:
binutils/ChangeLog
binutils/objdump.c
binutils/readelf.c
ld/ChangeLog
ld/ldlang.c
ld/testsuite/ld-ctf/diag-ctf-version-f.d
ld/testsuite/ld-ctf/diag-cttname-invalid.d
ld/testsuite/ld-ctf/diag-decompression-failure.d
ld/testsuite/ld-ctf/diag-parname.d
ld/testsuite/ld-ctf/diag-unsupported-flag.d
ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d
ld/testsuite/ld-ctf/diag-wrong-magic-number.d

index 05423bd8b143ea2a64fcbd3ee799b68aa5cbb644..44c28985fb8a09bea34c75bcb1d81e4928929175 100644 (file)
@@ -1,3 +1,8 @@
+2020-08-27  Nick Alcock  <nick.alcock@oracle.com>
+
+       * objdump.c (dump_ctf_errs): Unquote CTF error messages.
+       * readelf.c (dump_ctf_errs): Likewise.
+
 2020-08-27  Nick Alcock  <nick.alcock@oracle.com>
 
        * objdump.c (dump_ctf_archive_member): Move error-
index c18489614168e89ed4dcfc151805bf17af789dba..c7ad51e41eba8981f236c6f605c7185cf77167a2 100644 (file)
@@ -4083,7 +4083,7 @@ dump_ctf_errs (ctf_file_t *fp)
   /* Dump accumulated errors and warnings.  */
   while ((errtext = ctf_errwarning_next (fp, &it, &is_warning, &err)) != NULL)
     {
-      non_fatal (_("%s: `%s'"), is_warning ? _("warning"): _("error"),
+      non_fatal (_("%s: %s"), is_warning ? _("warning"): _("error"),
                 errtext);
       free (errtext);
     }
index c5796e83e1dfefa1a7a24279ce5bf8e09663ffcf..d4dcab841a64291f80740545490e6c94bd6f1d72 100644 (file)
@@ -14249,7 +14249,7 @@ dump_ctf_errs (ctf_file_t *fp)
   /* Dump accumulated errors and warnings.  */
   while ((errtext = ctf_errwarning_next (fp, &it, &is_warning, &err)) != NULL)
     {
-      error (_("%s: `%s'"), is_warning ? _("warning"): _("error"),
+      error (_("%s: %s"), is_warning ? _("warning"): _("error"),
             errtext);
       free (errtext);
     }
index 4589432b81c43fe79b9625ef61ab76ae8a125623..4fd5546e9297e40d8becfebc37939b4f1eae5087 100644 (file)
@@ -1,3 +1,17 @@
+2020-08-27  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ldlang.c (dump_ctf_errs): Unquote CTF error messages.
+       (ldlang_open_ctf): Likewise.
+       (lang_merge_ctf): Likewise.
+       (lang_write_ctf): Likewise.
+       * testsuite/ld-ctf/diag-ctf-version-f.d: Adjust.
+       * testsuite/ld-ctf/diag-cttname-invalid.d: Adjust.
+       * testsuite/ld-ctf/diag-decompression-failure.d: Adjust.
+       * testsuite/ld-ctf/diag-parname.d: Adjust.
+       * testsuite/ld-ctf/diag-unsupported-flag.d: Adjust.
+       * testsuite/ld-ctf/diag-wrong-magic-number-mixed.d: Adjust.
+       * testsuite/ld-ctf/diag-wrong-magic-number.d: Adjust.
+
 2020-08-27  Nick Alcock  <nick.alcock@oracle.com>
 
        * ldlang.c (lang_ctf_errs_warnings): Support calls with NULL fp.
index dc6f1b4039901ab0481c3ee4f70a6ef7620135d9..4249b3a045df6cf5a1d1e4901aa79b9d83cd82cf 100644 (file)
@@ -3683,7 +3683,7 @@ lang_ctf_errs_warnings (ctf_file_t *fp)
 
   while ((text = ctf_errwarning_next (fp, &i, &is_warning, &err)) != NULL)
     {
-      einfo (_("%s: `%s'\n"), is_warning ? _("CTF warning"): _("CTF error"),
+      einfo (_("%s: %s\n"), is_warning ? _("CTF warning"): _("CTF error"),
             text);
       free (text);
     }
@@ -3724,7 +3724,7 @@ ldlang_open_ctf (void)
            {
              lang_ctf_errs_warnings (NULL);
              einfo (_("%P: warning: CTF section in %pB not loaded; "
-                      "its types will be discarded: `%s'\n"), file->the_bfd,
+                      "its types will be discarded: %s\n"), file->the_bfd,
                     ctf_errmsg (err));
            }
          continue;
@@ -3814,7 +3814,7 @@ lang_merge_ctf (void)
     {
       lang_ctf_errs_warnings (ctf_output);
       einfo (_("%P: warning: CTF linking failed; "
-              "output will have no CTF section: `%s'\n"),
+              "output will have no CTF section: %s\n"),
             ctf_errmsg (ctf_errno (ctf_output)));
       if (output_sect)
        {
@@ -3874,7 +3874,7 @@ lang_write_ctf (int late)
       if (!output_sect->contents)
        {
          einfo (_("%P: warning: CTF section emission failed; "
-                  "output will have no CTF section: `%s'\n"),
+                  "output will have no CTF section: %s\n"),
                 ctf_errmsg (ctf_errno (ctf_output)));
          output_sect->size = 0;
          output_sect->flags |= SEC_EXCLUDE;
index 860aae92a32207f2368130511b98daf6c84d4530..811ed5b017baa719a6eaca5a6c4989b5bd20b9ac 100644 (file)
@@ -2,4 +2,4 @@
 #source: diag-ctf-version-f.s
 #ld: -shared
 #name: Diagnostics - Unsupported CTF version
-#warning: CTF section .* not loaded; its types will be discarded: .CTF dict version is too new for libctf.
+#warning: CTF section .* not loaded; its types will be discarded: CTF dict version is too new for libctf
index de4aedc8842390b0dfe924483a6490149f7bdeee..8755c7e6664ab4ed949d119b8f55980dbb9c2034 100644 (file)
@@ -2,4 +2,4 @@
 #source: diag-cttname-invalid.s
 #ld: -shared
 #name: Diagnostics - Invalid type name.
-#warning: CTF section in .*not loaded; its types will be discarded: .String name offset is corrupt.
+#warning: CTF section in .*not loaded; its types will be discarded: String name offset is corrupt
index c4567e109198b429f4ad06b9acb09f6c9a2ce725..1deeea1804488f30e5d493e1563dd27fc68cf27b 100644 (file)
@@ -2,4 +2,4 @@
 #source: diag-decompression-failure.s
 #ld: -shared
 #name: Diagnostics - Decompression failure
-#warning: CTF section.* not loaded; its types will be discarded: .Failed to decompress CTF data.
+#warning: CTF section.* not loaded; its types will be discarded: Failed to decompress CTF data
index d2ce9aac81f7181017b687ef4660bacabb7b6450..f8fcd683a9dbe3c5c7fcbfae3ba4bb63c2bbe3da 100644 (file)
@@ -2,4 +2,4 @@
 #source: diag-parname.s
 #ld: -shared --ctf-variables
 #name: Diagnostics - No parent dictionary
-#warning: CTF linking failed; output will have no CTF section: .The parent CTF dictionary is unavailable.
+#warning: CTF linking failed; output will have no CTF section: The parent CTF dictionary is unavailable
index 879781772aa422c4a9747572eaf618d89ade510b..6b7a359e78c7295509f3c9d08c7bb729889757ba 100644 (file)
@@ -2,4 +2,4 @@
 #source: diag-unsupported-flag.s
 #ld: -shared
 #name: Diagnostics - Unsupported flag
-#warning: CTF section.* not loaded; its types will be discarded: .CTF header contains flags unknown to libctf.
+#warning: CTF section.* not loaded; its types will be discarded: CTF header contains flags unknown to libctf
index 5415c131940c03380dee807225e5f45fc25927e9..1e3344750c99c6fd6b1f058139561e2edf9d0f59 100644 (file)
@@ -3,7 +3,7 @@
 #source: B.c
 #ld: -shared --ctf-variables
 #name: Diagnostics - Wrong magic number mixed with valid CTF sections
-#warning: CTF section in .* not loaded; its types will be discarded: .Buffer does not contain CTF data.
+#warning: CTF section in .* not loaded; its types will be discarded: Buffer does not contain CTF data
 
 .*: +file format .*
 
index 847bbf87240a443d35d27de19c3616a29fc08250..0c27b0c996e735bc1ab117c2521bfb444215f45d 100644 (file)
@@ -2,4 +2,4 @@
 #source: diag-wrong-magic-number.s
 #ld: -shared
 #name: Diagnostics - Wrong magic number
-#warning: CTF section in .* not loaded; its types will be discarded: .Buffer does not contain CTF data.
+#warning: CTF section in .* not loaded; its types will be discarded: Buffer does not contain CTF data