Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / linkerscript / orphan-align.s
blobb866beaa898bba2cf299cb5ea15d8df87bf859fa
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: echo "SECTIONS { \
4 # RUN: . = SIZEOF_HEADERS; \
5 # RUN: .text : { *(.text) } \
6 # RUN: . = ALIGN(0x1000); \
7 # RUN: .data.rel.ro : { *(.data.rel.ro) } \
8 # RUN: }" > %t.script
9 # RUN: ld.lld -o %t -T %t.script %t.o -shared --no-rosegment
10 # RUN: llvm-readobj -l %t | FileCheck %s
13 # Test that the orphan section foo is placed before the ALIGN and so the second
14 # PT_LOAD is aligned.
17 # CHECK: Type: PT_LOAD
18 # CHECK-NEXT: Offset: 0x0
20 # CHECK: Type: PT_LOAD
21 # CHECK-NEXT: Offset: 0x1000
23 nop
24 .section .data.rel.ro, "aw"
25 .byte 0
27 .section foo, "ax"
28 nop