Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / linkerscript / orphans.s
blob03088b5bc92c966c9fd555c042788ba6a8b1097b
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4 # RUN: echo "SECTIONS { .writable : { *(.writable) } }" > %t.script
5 # RUN: ld.lld -o %t.out --script %t.script %t
6 # RUN: llvm-objdump --section-headers %t.out | \
7 # RUN: FileCheck -check-prefix=TEXTORPHAN %s
9 # RUN: echo "SECTIONS { .text : { *(.text) } }" > %t.script
10 # RUN: ld.lld -o %t.out --script %t.script %t
11 # RUN: llvm-objdump --section-headers %t.out | \
12 # RUN: FileCheck -check-prefix=WRITABLEORPHAN %s
14 # TEXTORPHAN: Sections:
15 # TEXTORPHAN-NEXT: Idx Name
16 # TEXTORPHAN-NEXT: 0
17 # TEXTORPHAN-NEXT: 1 .text
18 # TEXTORPHAN-NEXT: 2 .writable
20 # WRITABLEORPHAN: Sections:
21 # WRITABLEORPHAN-NEXT: Idx Name
22 # WRITABLEORPHAN-NEXT: 0
23 # WRITABLEORPHAN-NEXT: 1 .text
24 # WRITABLEORPHAN-NEXT: 2 .writable
26 .global _start
27 _start:
28 nop
30 .section .writable,"aw"
31 .zero 4