Fix PR 23499

Eric Christopher echristo at gmail.com
Wed May 27 11:06:22 PDT 2015


I can. Brief summary: the counter data for a particular function needs to
be in a comdat/elf section group with the function so that when a
particular function is chosen by the linker it chooses the data for that
function as well and then the other versions of the same function and their
respective data are discarded.

-eric

On Wed, May 27, 2015 at 10:55 AM Xinliang David Li <xinliangli at gmail.com>
wrote:

> Diego, can you summarize what has been discussed?
>
> thanks,
>
> David
>
> On Wed, May 27, 2015 at 8:22 AM, Diego Novillo <dnovillo at google.com>
> wrote:
>
>> Based on our IRC discussion, I think this will address the multiple
>> copy problem on ELF systems.  By placing the counters in the same
>> comdat section as its associated function, we get the linker to
>> discard them together with the discarded function.
>>
>> I don't think we need to create another test case just to trigger this
>> bug.  A small modification to the existing test case exposes it. I can
>> create a new one, if you'd rather have a different test case for this,
>> though.
>>
>> OK to commit?
>>
>>
>> Thanks.  Diego.
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150527/7b780b36/attachment.html>


More information about the llvm-commits mailing list