Skip to content

Commit 8e825a8

Browse files
committed
Make Win32 block trampolines SEH compatible.
This change is effectively a no-op (it's impossible to throw an exception through these trampolines, because they tail call the real block), but it does prevent the linker from complaining that we're linking SEH-aware and SEH-unaware code.
1 parent 1d16467 commit 8e825a8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

block_trampolines.S

+13
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@
4242
////////////////////////////////////////////////////////////////////////////////
4343
// x86-32 trampoline
4444
////////////////////////////////////////////////////////////////////////////////
45+
46+
#ifdef _WIN32
47+
// Mark this compilation unit as SEH-safe
48+
.text
49+
.def @feat.00;
50+
.scl 3;
51+
.type 0;
52+
.endef
53+
.globl @feat.00
54+
.set @feat.00, 1
55+
.data
56+
#endif
57+
4558
.macro trampoline arg0, arg1
4659
call 1f # Store the instruction pointer on the stack
4760
1:

0 commit comments

Comments
 (0)