1# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
2# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts && llvm-objdump --private-headers %t | FileCheck %s
3# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
4# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
5# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
6
7--- !mach-o
8arch:            x86_64
9file-type:       MH_OBJECT
10flags:           [ MH_SUBSECTIONS_VIA_SYMBOLS ]
11sections:
12  - segment:         __TEXT
13    section:         __text
14    type:            S_REGULAR
15    attributes:      [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
16    address:         0x0000000000000000
17    content:         [ 0x00, 0x00, 0x00, 0x00 ]
18global-symbols:
19  - name:            _main
20    type:            N_SECT
21    scope:           [ N_EXT ]
22    sect:            1
23    value:           0x0000000000000000
24...
25
26# CHECK: Load command {{[0-9]*}}
27# CHECK:   cmd LC_FUNCTION_STARTS
28# CHECK:   cmdsize 16
29# CHECK:   dataoff
30# CHECK:   datasize
31
32# NO_FUNCTION_STARTS-NOT: LC_FUNCTION_STARTS
33