diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-01-25 07:39:05 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-01-25 09:26:25 -0800 |
commit | 624c610dd46ed441c349f4bd889f3416cf867fd5 (patch) | |
tree | b2a868d3c3a094ae5b554d1de861e7886f950b55 /ld | |
parent | 033c5df8401bd72ab8d1d123daafab6ff3bd32b9 (diff) | |
download | binutils-624c610dd46ed441c349f4bd889f3416cf867fd5.zip binutils-624c610dd46ed441c349f4bd889f3416cf867fd5.tar.gz binutils-624c610dd46ed441c349f4bd889f3416cf867fd5.tar.bz2 |
ld: Always call output_unknown_cmdline_warning
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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ldmain.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index 3b4ad14..9ae541a 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")); } |