[PATCH] D85867: [ELF] Assign file offsets of non-SHF_ALLOC after SHF_ALLOC and set sh_addr=0 to non-SHF_ALLOC
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 01:15:21 PDT 2020
jhenderson added a reviewer: edd.
jhenderson added a subscriber: edd.
jhenderson added a comment.
I think this looks like it makes sense. Having the section header table out of order is a little weird to me, but also not illegal (indeed, I've used it on a few occasions to do crazy things before).
I've added @edd who reported pr47094, who might have further insight.
================
Comment at: lld/test/ELF/linkerscript/sections-nonalloc.s:21-23
+# CHECK-NEXT: [ 7] .symtab SYMTAB 0000000000000000 001028 000030 18 9
+# CHECK-NEXT: [ 8] .shstrtab STRTAB 0000000000000000 001058 00004d 00 0
+# CHECK-NEXT: [ 9] .strtab STRTAB 0000000000000000 0010a5 000008 00 0
----------------
Just to confirm - these three sections appear here in the section header table (before data2 and .text), because they are being placed near the other non-alloc sections, due to orphan section handling, I presume?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85867/new/
https://reviews.llvm.org/D85867
More information about the llvm-commits
mailing list