[LLVMdev] lld Atoms from STT_SECTION type symbols.

Sid Manning sidneym at codeaurora.org
Tue Oct 2 06:00:22 PDT 2012


+llvmdev

On 10/01/12 21:06, Sid Manning wrote:
>
> I committed a patch to update the ReaderELF.cpp that, in light of some
> recent changes in the writer, may need another update. WriterELF is
> looking for atoms of type, typeFirstInSection (STT_SECTION) but the
> reader isn't classifying those yet.
>
> I know there has been some discussion about discarding symbols of type
> STT_SECTION but I don't think that is safe. This section would never
> make it into the final executable:
>
>> .section .monkey, "a", @progbits
>>
>> .long 0xdeadbeef
>> .long 0xdeadbeef
>> .long 0xdeadbeef
>> .long 0xdeadbeef
>
> The above could be optionally garbage collected out but by default I
> think it should remain in the final output. That is what gnu-ld would do
> unless -gc-section specified.
>
> At the moment this has a side-effect of extraneous zero-size entries in
> the section header. As a rule it seems like section header 0 is the only
> section of zero size.
>
>


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



More information about the llvm-dev mailing list