[lld] [LLD][NFC] Don't use x64 import library for x86 target in safeseh-md tests. (PR #102736)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 10 02:17:48 PDT 2024
https://github.com/cjacek created https://github.com/llvm/llvm-project/pull/102736
Use llvm-lib to generate input library instead of a binary blob.
There is a mismatch between link target and importlib machine type in the test. This currently works because LLD ignores importlib machine type. I intend to change that, which would cause the test to fail.
>From ff413e24769dbabc96269b199b8fffd436458e8a Mon Sep 17 00:00:00 2001
From: Jacek Caban <jacek at codeweavers.com>
Date: Fri, 9 Aug 2024 20:25:48 +0200
Subject: [PATCH] [LLD][NFC] Don't use x64 import library for x86 target in
safeseh-md tests.
Use llvm-lib to generate input library instead of a binary blob.
---
lld/test/COFF/Inputs/except_handler3.lib | Bin 1364 -> 0 bytes
lld/test/COFF/safeseh-md.s | 12 ++++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
delete mode 100644 lld/test/COFF/Inputs/except_handler3.lib
diff --git a/lld/test/COFF/Inputs/except_handler3.lib b/lld/test/COFF/Inputs/except_handler3.lib
deleted file mode 100644
index fdc51ed7328555ededd6e03d629840b1bb487a44..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1364
zcmcIk%}&BV5FUPvrt#pxt4U4Nc%smjf`*t9F_DNsu$-4lNg%0)5DwhD at d!SIPr;M;
z7+!H^yIb2*Lx^#c*_rwF+wIKGbWdyUY&gDAG&Meo5jU`-v#ORX$rvaAum_Nt1LUqz
zz5w!{B#bp5yPclH8h1~(y=K?x^w?-I98KqJ?7n*bXl4Lo?S8AZNrblqGvGP*{q_TE
z)SWu+oV-jKOF1#I6SQP<k=)YEswvTdk~pj2`M&m7P?J|DJ`;7Lw``d~AjXvpXrOq@
zEM7Oj2g*LT016Y&ox5kcaN!sY4`m^M9BLbiE5Wk_%z5w95!wcIm4LW=h%<ee&I;xn
z9HEuxUdk;Ijjxi<pk!ll5;B$uk0>}@#Awnk8X>0~_=M27lrHMvM(Q!-8NL7QKTR*m
zHsN|(6-#<W at TrQFKR_2Hu)-=Dd;uq_Vof?iQxy|X=u#zU(0N%n!THyJOVLbyx7aH(
z*Pjl=-#r<7Sfc}6qYjJ?8*JHuVReb;M at eWCF9C5kp5HlQTb~F;vy7ecELSC+UbXca
Rvslu{FGK{JuT5I#e*^9C_SOIZ
diff --git a/lld/test/COFF/safeseh-md.s b/lld/test/COFF/safeseh-md.s
index d065af872b8f90..fda09fda64ede4 100644
--- a/lld/test/COFF/safeseh-md.s
+++ b/lld/test/COFF/safeseh-md.s
@@ -1,12 +1,15 @@
# REQUIRES: x86
-# RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj
-# RUN: lld-link %t.obj %S/Inputs/except_handler3.lib -safeseh -out:%t.exe -opt:noref -entry:main
+# RUN: split-file %s %t.dir
+# RUN: llvm-mc -triple i686-windows-msvc %t.dir/safeseh-md.s -filetype=obj -o %t.obj
+# RUN: llvm-lib -machine:x86 -out:%t.dir/except_handler3.lib -def:%t.dir/except_handler3.def
+# RUN: lld-link %t.obj %t.dir/except_handler3.lib -safeseh -out:%t.exe -opt:noref -entry:main
# RUN: llvm-readobj --coff-load-config %t.exe | FileCheck %s
# CHECK: SEHTable [
# CHECK-NEXT: 0x
# CHECK-NEXT: ]
+#--- safeseh-md.s
.def @feat.00;
.scl 3;
.type 0;
@@ -33,3 +36,8 @@ __load_config_used:
.fill 60, 1, 0
.long ___safe_se_handler_table
.long ___safe_se_handler_count
+
+#--- except_handler3.def
+NAME except_handler3.dll
+EXPORTS
+ _except_handler3
More information about the llvm-commits
mailing list