2015-11-15 04:56:08 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
|
2015-11-18 14:11:01 +08:00
|
|
|
# RUN: ld.lld %t1 -z execstack -o %t
|
2015-11-25 07:42:33 +08:00
|
|
|
# RUN: llvm-readobj --program-headers -s %t | FileCheck --check-prefix=RWX %s
|
2015-11-18 14:11:01 +08:00
|
|
|
# RUN: ld.lld %t1 -o %t
|
2015-11-25 07:42:33 +08:00
|
|
|
# RUN: llvm-readobj --program-headers -s %t | FileCheck --check-prefix=RW %s
|
2015-11-15 04:56:08 +08:00
|
|
|
|
2015-11-25 07:42:33 +08:00
|
|
|
# RW: Sections [
|
|
|
|
# RW-NOT: Name: .note.GNU-stack
|
|
|
|
# RW: ProgramHeaders [
|
|
|
|
# RW: ProgramHeader {
|
|
|
|
# RW: Type: PT_GNU_STACK
|
|
|
|
# RW-NEXT: Offset: 0x0
|
|
|
|
# RW-NEXT: VirtualAddress: 0x0
|
|
|
|
# RW-NEXT: PhysicalAddress: 0x0
|
|
|
|
# RW-NEXT: FileSize: 0
|
|
|
|
# RW-NEXT: MemSize: 0
|
|
|
|
# RW-NEXT: Flags [
|
|
|
|
# RW-NEXT: PF_R
|
|
|
|
# RW-NEXT: PF_W
|
|
|
|
# RW-NEXT: ]
|
|
|
|
# RW-NEXT: Alignment: 0
|
|
|
|
# RW-NEXT: }
|
|
|
|
# RW-NEXT: ]
|
2015-11-15 04:56:08 +08:00
|
|
|
|
2015-11-25 07:42:33 +08:00
|
|
|
# RWX-NOT: Name: .note.GNU-stack
|
|
|
|
# RWX-NOT: Type: PT_GNU_STACK
|
2015-11-15 04:56:08 +08:00
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|