[LLVMdev] [lld] Handling non SHF_ALLOC sections.
shankare at codeaurora.org
Tue Sep 17 12:43:33 PDT 2013
On 9/17/2013 1:47 PM, Michael Spencer wrote:
>> There is a way that we can handle this without lot of tweaks.
>> a) Assign the debug sections part of a linker internal segment(the segment
>> would not appear in the output file), hasOutputSegment will return true for
>> a debug section.
>> b) Around lines 623, in DefaultLayout, we find out if the section is
>> associated with the special debug section, we add this sepecial segment to
>> the list of segments
> The problem with this is that it's not just debug. We need to properly
> implement ELF semantics (ok, really gnu-ld semantics and the ELF spec
> doesn't say what should happen here (or anywhere really)). The semantics
> seem to be that the value of symbols in non SHF_ALLOC sections is their
> offset within the section.
Makes it much simpler, put all sections which do not have the ALLOC flag
in a internal segment, which doesnot appear in the output file.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-dev