42 lines · plain
1# REQUIRES: x862 3# RUN: rm -rf %t; split-file %s %t4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s5 6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/lib.o \7# RUN: %t/mangled-symbol.s8# RUN: llvm-ar csr %t/lib.a %t/lib.o9# RUN: llvm-ar csrT %t/lib_thin.a %t/lib.o10 11# RUN: %lld %t/main.o %t/lib.a -o %t/out12# RUN: llvm-nm %t/out13# RUN: %lld %t/main.o %t/lib_thin.a -o %t/out14# RUN: llvm-nm %t/out15# RUN: %lld %t/main.o -force_load %t/lib_thin.a -o %t/out16# RUN: llvm-nm %t/out17 18# RUN: rm %t/lib.o19# RUN: %lld %t/main.o %t/lib.a -o %t/out20# RUN: llvm-nm %t/out21# RUN: not %lld %t/main.o %t/lib_thin.a -demangle -o %t/out 2>&1 | \22# RUN: FileCheck --check-prefix=NOOBJ %s23# RUN: not %lld %t/main.o %t/lib_thin.a -o %t/out 2>&1 | \24# RUN: FileCheck --check-prefix=NOOBJNODEMANGLE %s25 26# CHECK: __Z1fv27# CHECK: _main28# NOOBJ: error: {{.*}}lib_thin.a: could not get the member defining symbol f(): '{{.*}}lib.o': {{[N|n]}}o such file or directory29# NOOBJNODEMANGLE: error: {{.*}}lib_thin.a: could not get the member defining symbol __Z1fv: '{{.*}}lib.o': {{[N|n]}}o such file or directory30 31#--- mangled-symbol.s32.globl __Z1fv33__Z1fv:34 retq35 36#--- main.s37.global _main38_main:39 callq __Z1fv40 mov $0, %rax41 retq42