[PATCH] D84001: [ELF] Allow mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER sections and sort within InputSectionDescription
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 23:17:26 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/test/ELF/linkerscript/linkorder.s:59
+# CHECK4: Hex dump of section '.rodata':
+# CHECK4-NEXT: 01cccccc 0302
----------------
jhenderson wrote:
> I'm either missing something, or something odd is going on here. Where are the `cccccc` coming from? There doesn't appear to be a .text section with any contents - it has the _start symbol in, if I follow correctly, but should be empty; nothing specifies alignment requirements either here.
sh_addralign(.text)=4. lld fills the gap with traps.
================
Comment at: lld/test/ELF/linkerscript/linkorder.s:78-79
.byte 1
+## If the two .rodata.bar sections are in the same InputSectionDescription,
+## 03 (sh_link!=0) will be ordered before 02 (sh_link=0).
+.section .rodata.bar,"a", at progbits
----------------
jhenderson wrote:
> It seems to me like you need test cases for sh_link=0 for SHF_LINK_ORDER sections here too?
`linkorder-mixed.test` tested sh_link=0 for SHF_LINK_ORDER sections
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84001/new/
https://reviews.llvm.org/D84001
More information about the llvm-commits
mailing list