summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-01-23 12:49:57 -0800
committerFangrui Song <i@maskray.me>2024-01-23 12:49:57 -0800
commit16343f0db286a5d2aaf9494dd402cda0d088d0a1 (patch)
tree1773c3b0e9165335cc80d633d6e110c0bb98a3d9
parentbb3e0d7fc34899f22cbaea311982098bae3de061 (diff)
[ELF,test] Fix defsym.ll
-rw-r--r--lld/test/ELF/lto/defsym.ll22
1 files changed, 12 insertions, 10 deletions
diff --git a/lld/test/ELF/lto/defsym.ll b/lld/test/ELF/lto/defsym.ll
index 750c39362906..142201889f5c 100644
--- a/lld/test/ELF/lto/defsym.ll
+++ b/lld/test/ELF/lto/defsym.ll
@@ -1,17 +1,19 @@
; REQUIRES: x86
+; RUN: rm -rf %t && mkdir %t && cd %t
+
; LTO
-; RUN: llvm-as %s -o %t.o
-; RUN: llvm-as %S/Inputs/defsym-bar.ll -o %t1.o
-; RUN: ld.lld %t.o %t1.o -shared -o %t.so -defsym=bar2=bar3 -save-temps
-; RUN: llvm-readelf --symbols %t.so.lto.o | FileCheck --check-prefix=OBJ %s
-; RUN: llvm-objdump -d %t.so | FileCheck %s
+; RUN: llvm-as %s -o a.o
+; RUN: llvm-as %S/Inputs/defsym-bar.ll -o b.o
+; RUN: ld.lld a.o b.o -shared -o a.so -defsym=bar2=bar3 -save-temps
+; RUN: llvm-readelf --symbols a.so.lto.o | FileCheck --check-prefix=OBJ %s
+; RUN: llvm-objdump -d a.so | FileCheck %s
; ThinLTO
-; RUN: opt -module-summary %s -o %t.o
-; RUN: opt -module-summary %S/Inputs/defsym-bar.ll -o %t1.o
-; RUN: ld.lld %t.o %t1.o -shared -o %t2.so -defsym=bar2=bar3 -save-temps
-; RUN: llvm-readelf --symbols %t2.so1.lto.o | FileCheck --check-prefix=OBJ %s
-; RUN: llvm-objdump -d %t2.so | FileCheck %s
+; RUN: opt -module-summary %s -o a.o
+; RUN: opt -module-summary %S/Inputs/defsym-bar.ll -o b.o
+; RUN: ld.lld a.o b.o -shared -o a2.so -defsym=bar2=bar3 -save-temps
+; RUN: llvm-readelf --symbols a2.so1.lto.o | FileCheck --check-prefix=OBJ %s
+; RUN: llvm-objdump -d a2.so | FileCheck %s
; OBJ: UND bar2