[PATCH] D22356: [ThinLTO] Perform conservative weak/linkonce resolution in distributed backend case

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 17:30:45 PDT 2016


On Tue, Jul 19, 2016 at 5:28 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:

>
> On Jul 19, 2016, at 5:23 PM, Teresa Johnson <tejohnson at google.com> wrote:
>
>
>
> On Tue, Jul 19, 2016 at 5:18 PM, Mehdi Amini <mehdi.amini at apple.com>
> wrote:
>
>>
>> On Jul 19, 2016, at 6:12 AM, Teresa Johnson <tejohnson at google.com> wrote:
>>
>>
>>
>> On Mon, Jul 18, 2016 at 10:40 PM, Xinliang David Li <davidxl at google.com>
>> wrote:
>>
>>> Good example.  I think I am convinced :)
>>>
>>
>> Yes, I can't think of another way to get this case to work without being
>> far more conservative about importing, unfortunately. Ok, let me figure out
>> what the best way is to transmit this info on to the final link through the
>> build system. Probably through a file that can be directly used with the @
>> linker option in place of input files.
>>
>>
>> Do you have an example where it matters?
>> The only case I can imagine is mixing ThinLTO files with non-ThinLTO
>> files, and the same weak symbol defined in both.
>>
>
> Yes, this and the follow on fix both were for cases that came from real
> (internal) applications.
>
> IIRC, the weak symbols came from headers included in multiple places (all
> ThinLTO files).
>
>
> I understand the issue with back-reference because the use of
> —start-lib/—end-lib, but I don’t understand why you got multiple weak out
> of the ThinLTO backends?
> I.e. we should turn all but one to available externally, so no duplicate
> should be seen during the second link.
>

This bug is about why we can't do the conversion to available externally.
Teresa


>
>> Mehdi
>
>
>
> Working on build system changes right now, I've confirmed with a recent
> binutils that we have enough info that the llvm side to emit these should
> be trivial.
>
>
>
>>>> Mehdi
>>
>
>
>
> --
> Teresa Johnson |  Software Engineer |  tejohnson at google.com |
> 408-460-2413
>
>
>


-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/992e7791/attachment.html>


More information about the llvm-commits mailing list