forked from OSchip/llvm-project
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
# RUN: lld -flavor darwin -arch x86_64 -macosx_version_min 10.8 %s -o %t && \
|
|
# RUN: llvm-objdump -macho -private-headers %t | FileCheck %s
|
|
#
|
|
# RUN: lld -flavor darwin -arch x86_64 -macosx_version_min 10.8 %s -pie -o %t\
|
|
# RUN: && llvm-objdump -macho -private-headers %t | FileCheck %s
|
|
#
|
|
# RUN: lld -flavor darwin -arch x86_64 -macosx_version_min 10.8 %s -no_pie -o %t\
|
|
# RUN: && llvm-objdump -macho -private-headers %t \
|
|
# RUN: | FileCheck --check-prefix=CHECK_NO_PIE %s
|
|
#
|
|
# Test various PIE options.
|
|
#
|
|
|
|
--- !mach-o
|
|
arch: x86_64
|
|
file-type: MH_OBJECT
|
|
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
|
|
has-UUID: false
|
|
OS: unknown
|
|
sections:
|
|
- segment: __TEXT
|
|
section: __text
|
|
type: S_REGULAR
|
|
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
|
|
address: 0x0000000000000000
|
|
content: [ 0xC3 ]
|
|
global-symbols:
|
|
- name: _main
|
|
type: N_SECT
|
|
scope: [ N_EXT ]
|
|
sect: 1
|
|
value: 0x0000000000000000
|
|
|
|
--- !mach-o
|
|
arch: x86_64
|
|
file-type: MH_DYLIB
|
|
install-name: /usr/lib/libSystem.B.dylib
|
|
exports:
|
|
- name: dyld_stub_binder
|
|
|
|
...
|
|
|
|
# CHECK: MH_MAGIC_64 {{[0-9a-zA-Z _]+}} TWOLEVEL PIE
|
|
# CHECK_NO_PIE-NOT: MH_MAGIC_64 {{[0-9a-zA-Z _]+}} TWOLEVEL PIE
|