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

Shankar Easwaran shankare at codeaurora.org
Mon Feb 23 09:40:11 PST 2015


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.

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.

Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150223/2484732e/attachment.html>


More information about the llvm-commits mailing list