1# REQUIRES: x86 2# RUN: rm -rf %t 3# RUN: split-file %s %t 4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o 5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o 6# RUN: llvm-ar crs %t/foo.a %t/foo.o 7# RUN: not %lld -o /dev/null %t/main.o 2>&1 | \ 8# RUN: FileCheck %s -DSYM=_foo -DFILENAME=%t/main.o 9# RUN: not %lld -o /dev/null %t/main.o %t/foo.a 2>&1 | \ 10# RUN: FileCheck %s -DSYM=_bar -DFILENAME='foo.a(foo.o)' 11# RUN: not %lld -o /dev/null %t/main.o -force_load %t/foo.a 2>&1 | \ 12# RUN: FileCheck %s -DSYM=_bar -DFILENAME='foo.a(foo.o)' 13# CHECK: error: undefined symbol [[SYM]], referenced from [[FILENAME]] 14 15#--- foo.s 16.globl _foo 17.text 18_foo: 19 callq _bar 20 retq 21 22#--- main.s 23.globl _main 24.text 25_main: 26 callq _foo 27 movq $0, %rax 28 retq 29