binutils, ld: dequote libctf error messages
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.
This commit is contained in:
parent
926c9e7665
commit
5e9b84f7a2
@ -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>
|
2020-08-27 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
* objdump.c (dump_ctf_archive_member): Move error-
|
* objdump.c (dump_ctf_archive_member): Move error-
|
||||||
|
@ -4083,7 +4083,7 @@ dump_ctf_errs (ctf_file_t *fp)
|
|||||||
/* Dump accumulated errors and warnings. */
|
/* Dump accumulated errors and warnings. */
|
||||||
while ((errtext = ctf_errwarning_next (fp, &it, &is_warning, &err)) != NULL)
|
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);
|
errtext);
|
||||||
free (errtext);
|
free (errtext);
|
||||||
}
|
}
|
||||||
|
@ -14249,7 +14249,7 @@ dump_ctf_errs (ctf_file_t *fp)
|
|||||||
/* Dump accumulated errors and warnings. */
|
/* Dump accumulated errors and warnings. */
|
||||||
while ((errtext = ctf_errwarning_next (fp, &it, &is_warning, &err)) != NULL)
|
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);
|
errtext);
|
||||||
free (errtext);
|
free (errtext);
|
||||||
}
|
}
|
||||||
|
14
ld/ChangeLog
14
ld/ChangeLog
@ -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>
|
2020-08-27 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
* ldlang.c (lang_ctf_errs_warnings): Support calls with NULL fp.
|
* ldlang.c (lang_ctf_errs_warnings): Support calls with NULL fp.
|
||||||
|
@ -3683,7 +3683,7 @@ lang_ctf_errs_warnings (ctf_file_t *fp)
|
|||||||
|
|
||||||
while ((text = ctf_errwarning_next (fp, &i, &is_warning, &err)) != NULL)
|
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);
|
text);
|
||||||
free (text);
|
free (text);
|
||||||
}
|
}
|
||||||
@ -3724,7 +3724,7 @@ ldlang_open_ctf (void)
|
|||||||
{
|
{
|
||||||
lang_ctf_errs_warnings (NULL);
|
lang_ctf_errs_warnings (NULL);
|
||||||
einfo (_("%P: warning: CTF section in %pB not loaded; "
|
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));
|
ctf_errmsg (err));
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -3814,7 +3814,7 @@ lang_merge_ctf (void)
|
|||||||
{
|
{
|
||||||
lang_ctf_errs_warnings (ctf_output);
|
lang_ctf_errs_warnings (ctf_output);
|
||||||
einfo (_("%P: warning: CTF linking failed; "
|
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)));
|
ctf_errmsg (ctf_errno (ctf_output)));
|
||||||
if (output_sect)
|
if (output_sect)
|
||||||
{
|
{
|
||||||
@ -3874,7 +3874,7 @@ lang_write_ctf (int late)
|
|||||||
if (!output_sect->contents)
|
if (!output_sect->contents)
|
||||||
{
|
{
|
||||||
einfo (_("%P: warning: CTF section emission failed; "
|
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)));
|
ctf_errmsg (ctf_errno (ctf_output)));
|
||||||
output_sect->size = 0;
|
output_sect->size = 0;
|
||||||
output_sect->flags |= SEC_EXCLUDE;
|
output_sect->flags |= SEC_EXCLUDE;
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
#source: diag-ctf-version-f.s
|
#source: diag-ctf-version-f.s
|
||||||
#ld: -shared
|
#ld: -shared
|
||||||
#name: Diagnostics - Unsupported CTF version
|
#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
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
#source: diag-cttname-invalid.s
|
#source: diag-cttname-invalid.s
|
||||||
#ld: -shared
|
#ld: -shared
|
||||||
#name: Diagnostics - Invalid type name.
|
#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
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
#source: diag-decompression-failure.s
|
#source: diag-decompression-failure.s
|
||||||
#ld: -shared
|
#ld: -shared
|
||||||
#name: Diagnostics - Decompression failure
|
#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
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
#source: diag-parname.s
|
#source: diag-parname.s
|
||||||
#ld: -shared --ctf-variables
|
#ld: -shared --ctf-variables
|
||||||
#name: Diagnostics - No parent dictionary
|
#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
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
#source: diag-unsupported-flag.s
|
#source: diag-unsupported-flag.s
|
||||||
#ld: -shared
|
#ld: -shared
|
||||||
#name: Diagnostics - Unsupported flag
|
#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
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#source: B.c
|
#source: B.c
|
||||||
#ld: -shared --ctf-variables
|
#ld: -shared --ctf-variables
|
||||||
#name: Diagnostics - Wrong magic number mixed with valid CTF sections
|
#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 .*
|
.*: +file format .*
|
||||||
|
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
#source: diag-wrong-magic-number.s
|
#source: diag-wrong-magic-number.s
|
||||||
#ld: -shared
|
#ld: -shared
|
||||||
#name: Diagnostics - Wrong magic number
|
#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
|
||||||
|
Loading…
Reference in New Issue
Block a user