[PATCH] D13275: [lld][elf2] Sort output sections.
Michael Spencer via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 17:16:32 PDT 2015
On Wed, Sep 30, 2015 at 5:00 PM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> The patch can be simplified a bit (see attached).
>
> Any reason you still had the SHT_NOBITS logic? If so it would need a
> comment, and would be even better to have it in another patch, no?
Because we'd do layout wrong otherwise. If you have ALLOC, ALLOC
NOBITS, ALLOC, then you get VA space allocated for the NOBITS section,
but no file space. Then when we create the PT_LOAD it just sets filesz
and memsz assuming the NOBITS sections come after the non-NOBITS
sections, so the 3rd section gets loaded at the wrong VA.
Also, why did you remove the section-layout test?
- Michael Spencer
>
> In any case. The attached variation LGTM.
>
> On 30 September 2015 at 19:14, Michael Spencer <bigcheesegs at gmail.com> wrote:
>> Bigcheese updated this revision to Diff 36157.
>> Bigcheese added a comment.
>>
>> Resolve comments.
>>
>>
>> http://reviews.llvm.org/D13275
>>
>> Files:
>> ELF/OutputSections.cpp
>> ELF/Writer.cpp
>> test/elf2/basic-aarch64.s
>> test/elf2/basic-mips.s
>> test/elf2/basic.s
>> test/elf2/basic32.s
>> test/elf2/basic32be.s
>> test/elf2/basic64be.s
>> test/elf2/bss.s
>> test/elf2/discard-none.s
>> test/elf2/dynamic-reloc-index.s
>> test/elf2/dynamic-reloc.s
>> test/elf2/got.s
>> test/elf2/local-dynamic.s
>> test/elf2/plt-i686.s
>> test/elf2/plt.s
>> test/elf2/relocation-common.s
>> test/elf2/relocation-i686.s
>> test/elf2/relocation-local.s
>> test/elf2/relocation.s
>> test/elf2/section-layout.s
>> test/elf2/shared.s
>> test/elf2/symbols.s
>>
More information about the llvm-commits
mailing list