This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] PR ld/16756: Incorrect warning message
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Thu, 27 Mar 2014 08:22:42 -0700
- Subject: Re: [PATCH] PR ld/16756: Incorrect warning message
- Authentication-results: sourceware.org; auth=none
- References: <20140326192417 dot GA8618 at intel dot com> <20140327022448 dot GR18201 at bubble dot grove dot modra dot org>
On Wed, Mar 26, 2014 at 7:24 PM, Alan Modra <email@example.com> wrote:
> On Wed, Mar 26, 2014 at 12:24:17PM -0700, H.J. Lu wrote:
>> This patch scans all input files for symbol reference warning if the
>> symbol reference doesn't exist in the current input file. It issues a
>> warning only if a reference is found. When LTO inlines or removes all
>> references to the symbol, we won't issue the symbol reference warning.
>> OK to install?
> This description isn't exactly correct. The previous code used to
> warn if there was a reference. You're changing ld to only warn if
That is true, even if the reference is removed later.
> there is a reference *in a relocation*.
Thus is similar to a reference inlined by compiler, in which
case linker doesn't issue a warning.
> I'm not sure that is a good idea. ie. I think the following fallback
> should stay.
>> - einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
> Patch is OK with that change.
I checked it in with the above line restored.