2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
4 # RUN: ld.lld %t1 -z execstack -o %t
5 # RUN: llvm-readobj --program-headers -S %t | FileCheck --check-prefix=RWX %s
7 # RUN: ld.lld %t1 -o %t
8 # RUN: llvm-readobj --program-headers -S %t | FileCheck --check-prefix=RW %s
10 # RUN: ld.lld %t1 -o %t -z noexecstack
11 # RUN: llvm-readobj --program-headers -S %t | FileCheck --check-prefix=RW %s
13 # RUN: ld.lld %t1 -o %t -z nognustack
14 # RUN: llvm-readobj --program-headers -s %t | FileCheck --check-prefix=NOGNUSTACK %s
16 # RW: Type: PT_GNU_STACK
17 # RW-NEXT: Offset: 0x0
18 # RW-NEXT: VirtualAddress: 0x0
19 # RW-NEXT: PhysicalAddress: 0x0
20 # RW-NEXT: FileSize: 0
26 # RW-NEXT: Alignment: 0
28 # RWX: Type: PT_GNU_STACK
29 # RWX-NEXT: Offset: 0x0
30 # RWX-NEXT: VirtualAddress: 0x0
31 # RWX-NEXT: PhysicalAddress: 0x0
32 # RWX-NEXT: FileSize: 0
33 # RWX-NEXT: MemSize: 0
39 # RWX-NEXT: Alignment: 0
41 # NOGNUSTACK-NOT: Type: PT_GNU_STACK