Fix PR 23499

Eric Christopher echristo at
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.


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

> Diego, can you summarize what has been discussed?
> thanks,
> David
> On Wed, May 27, 2015 at 8:22 AM, Diego Novillo <dnovillo at>
> 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
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the llvm-commits mailing list