[lld] r205163 - [core] support .gnu.linkonce sections

Rui Ueyama ruiu at google.com
Mon Mar 31 09:47:19 PDT 2014


On Mon, Mar 31, 2014 at 9:27 AM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> On 3/30/2014 11:11 PM, Rui Ueyama wrote:
>
>> This is not an obvious change to Core, not suitable for post-commit
>> review.
>> Please roll it back until we reach a conclusion that this is the right
>> design.
>>
>>  I am not sure why its not a change, that has to be present in core. See
> my notes below.


I don't get it. What do you mean?

Anyways, 1) this change is to a common component of LLD shared by all
ports, 2) made everybody writing code for COMDAT to check gnu.linkonce too,
and 3) was not discussed if that is the right design. If this repository is
owned by you that's fine but this is a shared repository. Please follow the
rule.


>  ============================================================
>>> ==================
>>> --- lld/trunk/include/lld/Core/DefinedAtom.h (original)
>>> +++ lld/trunk/include/lld/Core/DefinedAtom.h Sun Mar 30 22:16:37 2014
>>> @@ -147,6 +147,7 @@ public:
>>>       typeRWNote,             // Identifies readwrite note sections [ELF]
>>>       typeNoAlloc,            // Identifies non allocatable sections
>>> [ELF]
>>>       typeGroupComdat,        // Identifies a section group [ELF, COFF]
>>> +    typeGnuLinkOnce,        // Identifies a gnu.linkonce section [ELF]
>>>
>>>  So you defined a new type for gnu.linkonce sections, but throughout this
>> patch typeGnuLinkOnce is not distinguished from typeGroupComdat.
>>
> There is one thing that distinguishes between comdat and linkonce in the
> patch, see my below comment.
>
>    All if's
>> previously handled typeGroupComdat are now replaced with typeGroupComdat
>> ||
>> typeGnuLinkOnce. That does not look good.
>>
>> I don't see the reason we can't simply treat gnu.linkonce as
>> typeGroupComdat. If we treat gnu.linkonce such a way, only the ELF object
>> reader will have to handle gnu.linkonce sections and Resolver will remain
>> unchanged.
>>
> The only distinguishing factor with gnu linkonce and group comdat is to
> produce an error when the same group signature is part of COMDAT and the
> same group has a signature with linkonce.
>
> I dont think we can use typeGroupComdat for linkonce and comdat.
>
> Thanks
>
> Shankar Easwaran
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140331/35ff6322/attachment.html>


More information about the llvm-commits mailing list