2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4 # RUN: exec PT_LOAD FLAGS(0x4 | 0x1); \
5 # RUN: ro PT_LOAD FLAGS(0x4); \
8 # RUN: .pad : { QUAD(0); } :exec \
9 # RUN: .text : { *(.text) } \
10 # RUN: .ro : { *(.ro) } :ro \
12 # RUN: ld.lld -o %t --script %t.script %t.o
13 # RUN: llvm-readelf -S -l %t | FileCheck %s
15 ## The ".pad" section is not "live" and should be ignored by the
18 ## Check that the orphan section is placed correctly and belongs to
19 ## the correct segment.
21 # CHECK: Section Headers
24 # CHECK-NEXT: .orphan2
26 # CHECK-NEXT: .orphan1
28 # CHECK: Segment Sections
29 # CHECK-NEXT: .pad .text .orphan2
30 # CHECK-NEXT: .ro .orphan1
41 .section .orphan2,"ax"