diff --git a/lld/test/ELF/copy-relocation-zero-nonabs-addr.s b/lld/test/ELF/copy-relocation-zero-nonabs-addr.s --- a/lld/test/ELF/copy-relocation-zero-nonabs-addr.s +++ b/lld/test/ELF/copy-relocation-zero-nonabs-addr.s @@ -1,10 +1,12 @@ // REQUIRES: x86 -// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/copy-relocation-zero-nonabs-addr.s -o %t1.o -// RUN: ld.lld -Ttext=0 -o %t2.so --script=%p/Inputs/copy-relocation-zero-nonabs-addr.script %t1.o -shared -// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t3.o -// RUN: ld.lld %t2.so %t3.o -o %t4 -// RUN: llvm-readobj --symbols %t2.so | FileCheck --check-prefix=CHECKSO %s -// RUN: llvm-readobj --symbols %t4 | FileCheck %s +// RUN: rm -rf %t.dir +// RUN: mkdir %t.dir +// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/copy-relocation-zero-nonabs-addr.s -o %t.dir/obj1.o +// RUN: ld.lld -Ttext=0 -o %t.dir/libfoo.so --script=%p/Inputs/copy-relocation-zero-nonabs-addr.script %t.dir/obj1.o -shared +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.dir/obj2.o +// RUN: ld.lld %t.dir/obj2.o -L%t.dir -lfoo -o %t.dir/out +// RUN: llvm-readobj --symbols %t.dir/libfoo.so | FileCheck --check-prefix=CHECKSO %s +// RUN: llvm-readobj --symbols %t.dir/out | FileCheck %s .text .globl _start