[lld] a7f9c00 - [ELF][test] Test {crtbegin,crtend}{S,T}.o
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 30 01:08:15 PST 2022
Author: Fangrui Song
Date: 2022-01-30T01:08:10-08:00
New Revision: a7f9c002cd2e8053a06667923d2b5d45d4b9d947
URL: https://github.com/llvm/llvm-project/commit/a7f9c002cd2e8053a06667923d2b5d45d4b9d947
DIFF: https://github.com/llvm/llvm-project/commit/a7f9c002cd2e8053a06667923d2b5d45d4b9d947.diff
LOG: [ELF][test] Test {crtbegin,crtend}{S,T}.o
Added:
Modified:
lld/test/ELF/ctors_dtors_priority.s
Removed:
################################################################################
diff --git a/lld/test/ELF/ctors_dtors_priority.s b/lld/test/ELF/ctors_dtors_priority.s
index f68657fa35099..d164b556c2d73 100644
--- a/lld/test/ELF/ctors_dtors_priority.s
+++ b/lld/test/ELF/ctors_dtors_priority.s
@@ -3,7 +3,7 @@
// Test .ctors* and .dtors* are sorted by priority.
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
-// RUN: mkdir -p %t
+// RUN: rm -rf %t && mkdir -p %t
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
// RUN: %p/Inputs/ctors_dtors_priority1.s -o %t/crtbegin.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
@@ -23,6 +23,10 @@
// RUN: ld.lld %t1 %t2 %t/clang_rt.crtend-x86_64.o %t/clang_rt.crtbegin-x86_64.o -o %t.clang_rt-arch.exe
// RUN: llvm-objdump -s %t.clang_rt-arch.exe | FileCheck %s
+// RUN: cp %t/crtbegin.o %t/crtbeginS.o
+// RUN: cp %t/crtend.o %t/crtendT.o
+// RUN: ld.lld %t1 %t2 %t/crtendT.o %t/crtbeginS.o -o %t.ST.exe
+// RUN: cmp %t.exe %t.ST.exe
.globl _start
_start:
More information about the llvm-commits
mailing list