public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: PATCH: PR ld/12761: .gnu.warning.* doesn't work when building shared library
Date: Tue, 17 May 2011 06:04:00 -0000	[thread overview]
Message-ID: <mcrsjsd278z.fsf@coign.corp.google.com> (raw)
In-Reply-To: <20110516190512.GA10653@intel.com> (H. J. Lu's message of "Mon,	16 May 2011 12:05:12 -0700")

"H.J. Lu" <hongjiu.lu@intel.com> writes:

> We should issure a gnu warning when building shared library.  This patch
> implements it.  OK for trunk?

No, this is not how warning symbols are supposed to work.  We only want
to issue the warning for a warning symbol if there is some reference to
the symbol in the main program.  If we issue the warnings for a shared
library, then we will wind up issuing the warnings even if the program
does not ever refer to the symbol.  That is undesirable and will almost
certainly break some uses of warning symbols.

I think it would be reasonable to issue a warning when building a shared
library for a reference to a symbol defined in some other shared
library, but it is necessary to not give a warning for references to
symbols defined in the library being created.

Ian

  parent reply	other threads:[~2011-05-17  6:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 19:05 H.J. Lu
2011-05-17  1:51 ` Alan Modra
2011-05-17  6:04 ` Ian Lance Taylor [this message]
2011-05-17 13:12   ` H.J. Lu
2011-05-17 14:30     ` Ian Lance Taylor
2011-05-17 14:36       ` H.J. Lu
2011-05-17 15:02         ` Ian Lance Taylor
2011-05-17 15:05           ` H.J. Lu
2011-05-17 16:34             ` Ian Lance Taylor

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=mcrsjsd278z.fsf@coign.corp.google.com \
    --to=iant@google.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).