diff options
author | Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com> | 2020-04-15 15:37:34 +0200 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2020-07-22 18:03:39 +0100 |
commit | f320bba50ff0aab7ce342ab9e3d25f49fc45d468 (patch) | |
tree | 41db2530483114f88225e987e8e15322e73410d3 /ld | |
parent | 3dd6b890b4e2c1d908a5279f8f01c2a576ef9db3 (diff) | |
download | gdb-f320bba50ff0aab7ce342ab9e3d25f49fc45d468.zip gdb-f320bba50ff0aab7ce342ab9e3d25f49fc45d468.tar.gz gdb-f320bba50ff0aab7ce342ab9e3d25f49fc45d468.tar.bz2 |
ld: Reformat CTF errors into warnings.
ld/
* ldlang.c (lang_merge_ctf): Turn errors into warnings.
Fix a comment typo.
(lang_write_ctf): Turn an error into a warning.
(ldlang_open_ctf): Reformat warnings. Fix printing file names.
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/ldlang.c | 22 |
2 files changed, 19 insertions, 10 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 6927287..02ce249 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2020-07-22 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com> + + * ldlang.c (lang_merge_ctf): Turn errors into warnings. + Fix a comment typo. + (lang_write_ctf): Turn an error into a warning. + (ldlang_open_ctf): Reformat warnings. Fix printing file names. + 2020-07-22 Nick Alcock <nick.alcock@oracle.com> * ldlang.c (lang_ctf_errs_warnings): New, print CTF errors diff --git a/ld/ldlang.c b/ld/ldlang.c index cc64e7a..b0231a1 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -3693,8 +3693,8 @@ ldlang_open_ctf (void) if ((file->the_ctf = ctf_bfdopen (file->the_bfd, &err)) == NULL) { if (err != ECTF_NOCTFDATA) - einfo (_("%P: warning: CTF section in `%pI' not loaded: " - "its types will be discarded: `%s'\n"), file, + einfo (_("%P: warning: CTF section in %pB not loaded; " + "its types will be discarded: `%s'\n"), file->the_bfd, ctf_errmsg (err)); continue; } @@ -3780,11 +3780,11 @@ lang_merge_ctf (void) if (!file->the_ctf) continue; - /* Takes ownership of file->u.the_ctfa. */ + /* Takes ownership of file->the_ctf. */ if (ctf_link_add_ctf (ctf_output, file->the_ctf, file->filename) < 0) { - einfo (_("%F%P: cannot link with CTF in %pB: %s\n"), file->the_bfd, - ctf_errmsg (ctf_errno (ctf_output))); + einfo (_("%P: warning: CTF section in %pB cannot be linked: `%s'\n"), + file->the_bfd, ctf_errmsg (ctf_errno (ctf_output))); ctf_close (file->the_ctf); file->the_ctf = NULL; continue; @@ -3793,7 +3793,8 @@ lang_merge_ctf (void) if (ctf_link (ctf_output, CTF_LINK_SHARE_UNCONFLICTED) < 0) { - einfo (_("%F%P: CTF linking failed; output will have no CTF section: %s\n"), + einfo (_("%P: warning: CTF linking failed; " + "output will have no CTF section: `%s'\n"), ctf_errmsg (ctf_errno (ctf_output))); if (output_sect) { @@ -3850,8 +3851,9 @@ lang_write_ctf (int late) if (!output_sect->contents) { - einfo (_("%F%P: CTF section emission failed; output will have no " - "CTF section: %s\n"), ctf_errmsg (ctf_errno (ctf_output))); + einfo (_("%P: warning: CTF section emission failed; " + "output will have no CTF section: `%s'\n"), + ctf_errmsg (ctf_errno (ctf_output))); output_sect->size = 0; output_sect->flags |= SEC_EXCLUDE; } @@ -3890,8 +3892,8 @@ ldlang_open_ctf (void) if ((sect = bfd_get_section_by_name (file->the_bfd, ".ctf")) != NULL) { - einfo (_("%P: warning: CTF section in `%pI' not linkable: " - "%P was built without support for CTF\n"), file); + einfo (_("%P: warning: CTF section in %pB not linkable: " + "%P was built without support for CTF\n"), file->the_bfd); sect->size = 0; sect->flags |= SEC_EXCLUDE; } |