[PATCH] PR ld/17973: Don't generate the fake FILE symbol when plugin is used

H.J. Lu hjl.tools@gmail.com
Sat Feb 14 02:48:00 GMT 2015


On Fri, Feb 13, 2015 at 5:47 PM, Alan Modra <amodra@gmail.com> wrote:
> On Fri, Feb 13, 2015 at 11:29:51AM -0800, H.J. Lu wrote:
>>
>> GCC LTO plugin generates linker input files with random files, which
>> have no relations with input source files.  In order to avoid random
>> build id with LTO build, GCC won't generate the .file directive with
>> the names of random files.  See GCC PR lto/65015:
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65015
>>
>> for details.  When plugin is used, linker shouldn't use the names of
>> of random files for the fake FILE symbol either.  OK for master?
>
> No, completely removing the file symbol is wrong too.  As the comment
> says, the added file symbols prevent other local symbols from this
> particular input file from being incorrectly associated with a
> previous input file.  Can you use the original object file name for
> LTO .ltrans objects?
>

I uploaded a GCC patch at

https://gcc.gnu.org/bugzilla/attachment.cgi?id=34753

which does that when possible.


-- 
H.J.



More information about the Binutils mailing list