[PATCH] ld: Always call output_unknown_cmdline_warning
H.J. Lu
hjl.tools@gmail.com
Thu Jan 25 15:43:19 GMT 2024
Call output_unknown_cmdline_warning if there are no input files so that
$ ld -z bad-option
reports
ld: warning: -z bad-option ignored
ld: no input files
instead of
ld: no input files
PR ld/31289
* ldmain.c (main): Call output_unknown_cmdline_warning if there
are no input files.
---
ld/ldmain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 3b4ad144a2f..9ae541a5d82 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -471,6 +471,7 @@ main (int argc, char **argv)
{
if (version_printed || command_line.print_output_format)
xexit (0);
+ output_unknown_cmdline_warnings ();
einfo (_("%F%P: no input files\n"));
}
--
2.43.0
More information about the Binutils
mailing list