[lld] r230194 - [ELF] Add .gnu.linkonce support.

Rafael Espíndola rafael.espindola at gmail.com
Mon Feb 23 10:27:40 PST 2015


On Feb 23, 2015 12:40 PM, "Shankar Easwaran" <shankare at codeaurora.org>
wrote:
>
> On 2/23/2015 10:02 AM, Rafael Espíndola wrote:
>>
>> On 22 February 2015 at 19:04, Shankar Easwaran <shankare at codeaurora.org>
wrote:
>>>
>>> Author: shankare
>>> Date: Sun Feb 22 18:04:49 2015
>>> New Revision: 230194
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=230194&view=rev
>>> Log:
>>> [ELF] Add .gnu.linkonce support.
>>>
>>> When the GNU linker sees two input sections with the same name, and the
name
>>> starts with ".gnu.linkonce.", the linker will only keep one copy and
discard the
>>> other. Any section whose name starts with “.gnu.linkonce.” is a COMDAT
section.
>>>
>>> Some architectures like Hexagon use this section to store floating
point constants,
>>> that need be deduped.
>>
>> Why not use SHF_MERGE sections?
>
> I have seen SHF_MERGE only works with readonly, I may be wrong.

How can you merge read write data?

> SHF_MERGE does not work as there are specific signatures that are used
with .gnu.linkonce to store hot code too (.gnu.linkonce.t) and we also use
TLS floating point data in gnu linkonce too.

Code isn't a floating point constant :-)

What is the issue with shf_merge and tls?

Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150223/fb66d491/attachment.html>


More information about the llvm-commits mailing list