From 3d4a73e6015a9d3f0d79810985700b2a45cd6439 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 2 Apr 2012 12:42:52 +0200 Subject: [PATCH] ntdll: Add a __chkstk entry point for x86_64. --- dlls/kernel32/kernel32.spec | 2 ++ dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/signal_x86_64.c | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 0bdad73d41d..10d6da56b45 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1277,6 +1277,8 @@ @ stdcall WriteProfileStringW(wstr wstr wstr) @ stdcall WriteTapemark(ptr long long long) @ stdcall ZombifyActCtx(ptr) +@ stdcall -arch=x86_64 -private __C_specific_handler(ptr long ptr ptr) ntdll.__C_specific_handler +@ stdcall -arch=x86_64 -private -norelay __chkstk() ntdll.__chkstk @ stub _DebugOut @ stub _DebugPrintf @ stdcall _hread(long ptr long) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 0976bc56e03..bd9d41eb561 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1244,6 +1244,7 @@ # @ stub _CIsin # @ stub _CIsqrt @ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) +@ stdcall -private -arch=x86_64 -norelay __chkstk() # @ stub __isascii # @ stub __iscsym # @ stub __iscsymf diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 6677fed5a4e..b31cfb8f59a 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -1483,6 +1483,14 @@ static void restore_context( const CONTEXT *context, ucontext_t *sigcontext ) } +/************************************************************************** + * __chkstk (NTDLL.@) + * + * Supposed to touch all the stack pages, but we shouldn't need that. + */ +__ASM_GLOBAL_FUNC( __chkstk, "ret" ); + + /*********************************************************************** * RtlCaptureContext (NTDLL.@) */