[lld] r193556 - [PECOFF] Set section name for BSS atoms.

Rui Ueyama ruiu at google.com
Mon Oct 28 22:13:29 PDT 2013


On Mon, Oct 28, 2013 at 9:26 PM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> On 10/28/2013 11:20 PM, Rui Ueyama wrote:
>
>> On Mon, Oct 28, 2013 at 9:07 PM, Shankar Easwaran
>> <shankare at codeaurora.org>**wrote:
>>
>>  On 10/28/2013 6:26 PM, Rui Ueyama wrote:
>>>
>>>  -      : COFFDefinedFileAtom(file, name, "", scope, typeZeroFill, perms,
>>>> +      : COFFDefinedFileAtom(file, name, ".bss", scope, typeZeroFill,
>>>> perms,
>>>>
>>>>  The section name should be derived by the writer for default section
>>> types.
>>>
>>>  That is not true for COFF. In COFF, section name has significance unlike
>> ELF, and the linker is expected to emit sections with the same name as in
>> the object file.
>>
>
> ELF goes by section names too. What I am trying to say here is if the
> atoms contentType is typeZeroFill set the section name to .bss. Having a
> section name as the default would only increase the native IR file size,
> and increase in memory usage.
>

Well, there is an interesting feature in link.exe that you can rename or
combine sections by /merge:*.from*=*.to*. And you can combine .bss to .data
by /merge:.bss=.data. So it's better to set section name to BSS atoms.

Thanks
>
> Shankar Easwawran
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131028/03c7e372/attachment.html>


More information about the llvm-commits mailing list