aboutsummaryrefslogtreecommitdiff
path: root/lld/test
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-06-06 13:22:47 -0700
committerFangrui Song <i@maskray.me>2024-06-06 13:22:47 -0700
commitfbcb92ca017ee7fbf84be808701133fbdf3b1c59 (patch)
treec32c6df233afdf9469e20f99733cde3f552e49de /lld/test
parent06f03b806a347619f0251220baff56209abe9711 (diff)
downloadllvm-fbcb92ca017ee7fbf84be808701133fbdf3b1c59.zip
llvm-fbcb92ca017ee7fbf84be808701133fbdf3b1c59.tar.gz
llvm-fbcb92ca017ee7fbf84be808701133fbdf3b1c59.tar.bz2
[ELF] Test non-alloc orphan that does not the RF_NOT_ADDR_SET rank flag
Diffstat (limited to 'lld/test')
-rw-r--r--lld/test/ELF/linkerscript/sections-nonalloc.s5
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/test/ELF/linkerscript/sections-nonalloc.s b/lld/test/ELF/linkerscript/sections-nonalloc.s
index b4fab8c..d66e524 100644
--- a/lld/test/ELF/linkerscript/sections-nonalloc.s
+++ b/lld/test/ELF/linkerscript/sections-nonalloc.s
@@ -34,6 +34,11 @@
# RUN: ld.lld -T %t/b.lds %t.o -o %tb
# RUN: llvm-readelf -S -l %tb | FileCheck %s --check-prefix=CHECK1
+## --section-start causes the orphan other3 to be considered before .data3.
+## The non-alloc other3 does not disable the placement of .data3.
+# RUN: ld.lld -T %t/b.lds %t.o -o %tb --section-start=other3=0
+# RUN: llvm-readelf -S -l %tb | FileCheck %s --check-prefix=CHECK1
+
# CHECK1: [Nr] Name Type Address Off Size ES Flg Lk
# CHECK1-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0
# CHECK1-NEXT: [ 1] .text PROGBITS 00000000000000b0 0000b0 000001 00 AX 0