This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR ld/17973: Don't generate the fake FILE symbol when plugin is used
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Fri, 13 Feb 2015 18:47:57 -0800
- Subject: Re: [PATCH] PR ld/17973: Don't generate the fake FILE symbol when plugin is used
- Authentication-results: sourceware.org; auth=none
- References: <20150213192951 dot GA28961 at intel dot com> <20150214014734 dot GX4274 at bubble dot grove dot modra dot org>
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.