1# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \ 2# RUN: %p/Inputs/libfoo.a %p/Inputs/libbar.a -o %t1 3# RUN: llvm-nm -m -n %t1 | FileCheck %s 4# 5# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \ 6# RUN: -force_load %p/Inputs/libfoo.a %p/Inputs/libbar.a -o %t2 7# RUN: llvm-nm -m -n %t2 | FileCheck --check-prefix=CHECKF %s 8# 9# Test that -force_load causes members of static library to be loaded. 10# 11 12--- !mach-o 13arch: x86_64 14file-type: MH_OBJECT 15flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ] 16has-UUID: false 17OS: unknown 18sections: 19 - segment: __TEXT 20 section: __text 21 type: S_REGULAR 22 attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ] 23 address: 0x0000000000000000 24 content: [ 0xC3 ] 25global-symbols: 26 - name: _main 27 type: N_SECT 28 scope: [ N_EXT ] 29 sect: 1 30 value: 0x0000000000000000 31... 32 33# CHECK: {{[0-9a-f]+}} (__TEXT,__text) external _main 34# CHECK-NOT: {{[0-9a-f]+}} (__TEXT,__text) external _main 35 36# CHECKF: {{[0-9a-f]+}} (__TEXT,__text) external _main 37# CHECKF: {{[0-9a-f]+}} (__TEXT,__text) external _foo 38# CHECKF-NOT: {{[0-9a-f]+}} (__TEXT,__text) external _bar 39