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
|
|
|
|
2017-02-23 16:09:51 +08:00
|
|
|
# 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
|
2015-11-25 07:42:33 +08:00
|
|
|
# RW-NEXT: ]
|
2017-02-23 16:09:51 +08:00
|
|
|
# RW-NEXT: Alignment: 0
|
2015-11-15 04:56:08 +08:00
|
|
|
|
2017-02-23 16:09:51 +08:00
|
|
|
# RWX: Type: PT_GNU_STACK
|
|
|
|
# RWX-NEXT: Offset: 0x0
|
|
|
|
# RWX-NEXT: VirtualAddress: 0x0
|
|
|
|
# RWX-NEXT: PhysicalAddress: 0x0
|
|
|
|
# RWX-NEXT: FileSize: 0
|
|
|
|
# RWX-NEXT: MemSize: 0
|
|
|
|
# RWX-NEXT: Flags [
|
|
|
|
# RWX-NEXT: PF_R
|
|
|
|
# RWX-NEXT: PF_W
|
|
|
|
# RWX-NEXT: PF_X
|
|
|
|
# RWX-NEXT: ]
|
|
|
|
# RWX-NEXT: Alignment: 0
|
2015-11-15 04:56:08 +08:00
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|