From: Alan Modra <amodra@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] PR ld/16746: Don't issue a warning for reference in LTO IR
Date: Tue, 25 Mar 2014 22:39:00 -0000 [thread overview]
Message-ID: <20140325223910.GJ18201@bubble.grove.modra.org> (raw)
In-Reply-To: <20140325203952.GA11925@intel.com>
On Tue, Mar 25, 2014 at 01:39:52PM -0700, H.J. Lu wrote:
> case WARNC:
> - /* Issue a warning and cycle. */
> - if (h->u.i.warning != NULL)
> + /* Issue a warning and cycle. Don't issue a warning for
> + reference in LTO IR which may be removed by LTO later. */
> + if (h->u.i.warning != NULL
> + && (abfd->flags & BFD_PLUGIN) == 0)
So here you're handling references in LTO IR for warning symbols
defined in real object files or other LTO IR files..
> case WARN:
> + /* Don't issue a warning for reference in LTO IR which may be
> + removed by LTO later. Make a warning symbol instead. */
> + if ((hash_entry_bfd (h)->flags & BFD_PLUGIN) != 0)
> + goto mwarn;
> +
And here you have the case where the new symbol is a warning symbol,
in either LTO IR or real object files, but the reference was in an LTO
IR file.
What about the CWARN case, where you already have a definition that
may have been referenced, and the new symbol is a warning symbol?
You'll need to test h->non_ir_ref I think.
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2014-03-25 22:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 20:40 H.J. Lu
2014-03-25 22:39 ` Alan Modra [this message]
2014-03-25 22:50 ` H.J. Lu
2014-03-25 23:53 ` Alan Modra
2014-03-26 0:41 ` H.J. Lu
2014-03-26 19:29 ` H.J. Lu
2014-08-07 0:42 Merge WARN and CWARN cases in _bfd_generic_link_add_one_symbol Alan Modra
2014-08-07 0:55 ` [PATCH] PR ld/16746: Don't issue a warning for reference in LTO IR Alan Modra
2014-08-11 22:21 ` Hans-Peter Nilsson
2014-08-12 1:12 ` Alan Modra
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=20140325223910.GJ18201@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.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).