[PATCH] PR ld/16756: Incorrect warning message

H.J. Lu hjl.tools@gmail.com
Thu Mar 27 15:22:00 GMT 2014


On Wed, Mar 26, 2014 at 7:24 PM, Alan Modra <amodra@gmail.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.

-- 
H.J.



More information about the Binutils mailing list