1# REQUIRES: x86 2 3# RUN: rm -rf %t; split-file %s %t 4# RUN: mkdir %t/subdir 5 6# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/foo.s -o %t/foo.o 7# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/bar.s -o %t/bar.o 8# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/main.s -o %t/main.o 9 10# RUN: %lld -dylib -install_name @loader_path/libfoo.dylib %t/foo.o -o %t/subdir/libfoo.dylib 11 12## Test that @loader_path is replaced by the actual path, not by install_name. 13# RUN: %lld -dylib -reexport_library %t/subdir/libfoo.dylib -install_name /tmp/libbar.dylib %t/bar.o -o %t/subdir/libbar.dylib 14 15# RUN: %lld -lSystem %t/main.o %t/subdir/libbar.dylib -o %t/test 16# RUN: %lld -dylib -lSystem %t/main.o %t/subdir/libbar.dylib -o %t/libtest.dylib 17 18#--- foo.s 19.globl _foo 20_foo: 21 retq 22 23#--- bar.s 24.globl _bar 25_bar: 26 retq 27 28#--- main.s 29.section __TEXT,__text 30.global _main 31_main: 32 callq _foo 33 callq _bar 34 ret 35