From: "H.J. Lu" <hjl.tools@gmail.com>
To: Nick Clifton <nickc@redhat.com>
Cc: Jan Beulich <jbeulich@suse.com>, Fangrui Song <i@maskray.me>,
binutils@sourceware.org
Subject: Re: [PATCH] ld: Improve --fatal-warnings for unknown command-line options
Date: Thu, 25 Jan 2024 08:12:48 -0800 [thread overview]
Message-ID: <CAMe9rOocc88E5fmhao13Yx7yys1ehafzRveJ0LH4x_yw+dsCDg@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOrqpJ+JPpTyDqNe=RuQvcCFYgochbdd0u0_i_vv26+ZtQ@mail.gmail.com>
On Thu, Jan 25, 2024 at 7:45 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Jan 25, 2024 at 5:41 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Thu, Jan 25, 2024 at 3:32 AM Nick Clifton <nickc@redhat.com> wrote:
> > >
> > > Hi H.J.
> > >
> > > Thanks for taking this problem on. When I qrote my RFC I had
> > > not expected anyone to care that much...
> > >
> > > >>> This patch queues unknown command-line option warnings and outputs queued
> > > >>> command-line option warnings after all command-line options have been
> > > >>> processed so that --fatal-warnings can work for unknown command-line
> > > >>> options regardless of the order of --fatal-warnings.
> > > >>>
> > > >>> When --fatal-warnings is used, the linker message is changed from
> > > >>>
> > > >>> ld: warning: -z bad-option ignored
> > > >>>
> > > >>> to
> > > >>>
> > > >>> ld: error: unsupported option: -z bad-option
> > > >>>
> > > >>> The above also applies to "-z dynamic-undefined-weak" when the known
> > > >>> "-z dynamic-undefined-weak" option is ignored.
> > >
> > > Patch approved - with the change suggested by Fangrui:
> >
> > Here is the patch I am checking. I renamed pr31289-*.d to
> > fatal-warnings-*.d.
> >
>
> Need this patch:
>
> https://sourceware.org/pipermail/binutils/2024-January/132126.html
>
> to make ld to report
>
> $ ld -z bad-option
>
> reports
>
> ld: warning: -z bad-option ignored
> ld: no input files
>
> instead of
>
> ld: no input files
>
Another patch is needed:
https://sourceware.org/pipermail/binutils/2024-January/132130.html
to xfail PR ld/31289 tests for targets which don't use standard ELF
emulation since the -z option is unrecognized.
--
H.J.
next prev parent reply other threads:[~2024-01-25 16:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 22:51 H.J. Lu
2024-01-25 7:58 ` Fangrui Song
2024-01-25 8:24 ` Jan Beulich
2024-01-25 11:32 ` Nick Clifton
2024-01-25 13:41 ` H.J. Lu
2024-01-25 15:45 ` H.J. Lu
2024-01-25 16:12 ` H.J. Lu [this message]
2024-01-26 10:24 ` Nick Clifton
2024-01-26 14:11 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOocc88E5fmhao13Yx7yys1ehafzRveJ0LH4x_yw+dsCDg@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=i@maskray.me \
--cc=jbeulich@suse.com \
--cc=nickc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).