mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-25 09:23:07 +00:00
ceee5de088
In the case where we are emitting to an object file, the platform is possibly unknown, and the source object files contained load commands for version min, we can take the maximum of those min versions and emit in in the output object file. This test also tests r259739. llvm-svn: 259742
35 lines
1.4 KiB
YAML
35 lines
1.4 KiB
YAML
# RUN: lld -flavor darwin -arch x86_64 %s -o %t -r -macosx_version_min 10.8 && llvm-objdump -private-headers %t | FileCheck %s
|
|
# RUN: lld -flavor darwin -arch x86_64 %s -o %t -r && llvm-objdump -private-headers %t | FileCheck %s
|
|
# RUN: lld -flavor darwin -arch x86_64 %s -o %t -r %p/Inputs/no-version-min-load-command-object.yaml && llvm-objdump -private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN
|
|
|
|
# If we are emitting an object file, then we only emit a min version load command if the source object file(s) all have
|
|
# version(s) and either known platforms or contain min version load commands themselves.
|
|
|
|
--- !mach-o
|
|
arch: x86_64
|
|
file-type: MH_OBJECT
|
|
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
|
|
min-os-version-kind: LC_VERSION_MIN_MACOSX
|
|
min-os-version: 10.8
|
|
sections:
|
|
- segment: __TEXT
|
|
section: __text
|
|
type: S_REGULAR
|
|
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
|
|
address: 0x0000000000000000
|
|
content: [ 0x00, 0x00, 0x00, 0x00 ]
|
|
global-symbols:
|
|
- name: _main
|
|
type: N_SECT
|
|
scope: [ N_EXT ]
|
|
sect: 1
|
|
value: 0x0000000000000000
|
|
...
|
|
|
|
# CHECK: Load command {{[0-9]*}}
|
|
# CHECK: cmd LC_VERSION_MIN_MACOSX
|
|
# CHECK: cmdsize 16
|
|
# CHECK: version 10.8
|
|
# CHECK: sdk n/a
|
|
|
|
# NO_VERSION_MIN-NOT: LC_VERSION_MIN_MACOSX |