You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against bf454cc39428fc5299e5c26d9c0ddc6a9277c7ae.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 362b04b78c2da18e81dd4f571d3671d452c76634 Mon Sep 17 00:00:00 2001
|
||||
From 25d08438aba3dee16c79ce3168a4f76f39816fad Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 16 May 2017 04:37:52 +0200
|
||||
Subject: [PATCH] krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit
|
||||
@@ -13,7 +13,7 @@ Subject: [PATCH] krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit
|
||||
dlls/krnl386.exe16/task.c | 14 +++++------
|
||||
dlls/krnl386.exe16/thunk.c | 36 +++++++++++++--------------
|
||||
dlls/krnl386.exe16/wowthunk.c | 20 +++++++--------
|
||||
dlls/ntdll/signal_i386.c | 2 +-
|
||||
dlls/ntdll/unix/signal_i386.c | 2 +-
|
||||
dlls/system.drv16/system.c | 2 +-
|
||||
dlls/toolhelp.dll16/toolhelp.c | 6 ++---
|
||||
dlls/user.exe16/message.c | 16 ++++++------
|
||||
@@ -267,10 +267,10 @@ index 39a60cb97a9..21de62c5a01 100644
|
||||
context->Esp = OFFSETOF(pData->old_ss_sp) - sizeof(DWORD); /*ret addr*/
|
||||
pData->old_ss_sp = 0;
|
||||
diff --git a/dlls/krnl386.exe16/thunk.c b/dlls/krnl386.exe16/thunk.c
|
||||
index 78925f594ba..141acb8d5e6 100644
|
||||
index e913a08f88c..ecc94371488 100644
|
||||
--- a/dlls/krnl386.exe16/thunk.c
|
||||
+++ b/dlls/krnl386.exe16/thunk.c
|
||||
@@ -428,7 +428,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context )
|
||||
@@ -429,7 +429,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context )
|
||||
context16.Eip = LOWORD(context->Edx);
|
||||
/* point EBP to the STACK16FRAME on the stack
|
||||
* for the call_to_16 to set up the register content on calling */
|
||||
@@ -279,7 +279,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
|
||||
/*
|
||||
* used to be (problematic):
|
||||
@@ -450,7 +450,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context )
|
||||
@@ -451,7 +451,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context )
|
||||
* the number of parameters that the Win16 function
|
||||
* accepted (that it popped from the corresponding Win16 stack) */
|
||||
context->Esp += LOWORD(context16.Esp) -
|
||||
@@ -288,7 +288,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
}
|
||||
DEFINE_REGS_ENTRYPOINT( QT_Thunk )
|
||||
|
||||
@@ -554,7 +554,7 @@ void WINAPI __regs_FT_Thunk( CONTEXT *context )
|
||||
@@ -555,7 +555,7 @@ void WINAPI __regs_FT_Thunk( CONTEXT *context )
|
||||
|
||||
context16.SegCs = HIWORD(callTarget);
|
||||
context16.Eip = LOWORD(callTarget);
|
||||
@@ -297,7 +297,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
|
||||
argsize = context->Ebp-context->Esp-0x40;
|
||||
if (argsize > sizeof(newstack)) argsize = sizeof(newstack);
|
||||
@@ -566,8 +566,8 @@ void WINAPI __regs_FT_Thunk( CONTEXT *context )
|
||||
@@ -567,8 +567,8 @@ void WINAPI __regs_FT_Thunk( CONTEXT *context )
|
||||
if (mapESPrelative & (1 << i))
|
||||
{
|
||||
SEGPTR *arg = (SEGPTR *)newstack[i];
|
||||
@@ -308,7 +308,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
+ (*(LPBYTE *)arg - oldstack));
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ void WINAPI __regs_FT_Thunk( CONTEXT *context )
|
||||
@@ -578,7 +578,7 @@ void WINAPI __regs_FT_Thunk( CONTEXT *context )
|
||||
context->Ecx = context16.Ecx;
|
||||
|
||||
context->Esp += LOWORD(context16.Esp) -
|
||||
@@ -317,7 +317,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
|
||||
/* Copy modified buffers back to 32-bit stack */
|
||||
memcpy( oldstack, newstack, argsize );
|
||||
@@ -712,7 +712,7 @@ void WINAPI __regs_Common32ThkLS( CONTEXT *context )
|
||||
@@ -713,7 +713,7 @@ void WINAPI __regs_Common32ThkLS( CONTEXT *context )
|
||||
context16.Edi = LOWORD(context->Ecx);
|
||||
context16.SegCs = HIWORD(context->Eax);
|
||||
context16.Eip = LOWORD(context->Eax);
|
||||
@@ -326,7 +326,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
|
||||
argsize = HIWORD(context->Edx) * 4;
|
||||
|
||||
@@ -768,7 +768,7 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT *context )
|
||||
@@ -769,7 +769,7 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT *context )
|
||||
|
||||
context16.SegCs = HIWORD(context->Edx);
|
||||
context16.Eip = LOWORD(context->Edx);
|
||||
@@ -335,7 +335,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
|
||||
argsize = 2 * *(WORD *)context->Esp + 2;
|
||||
|
||||
@@ -781,7 +781,7 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT *context )
|
||||
@@ -782,7 +782,7 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT *context )
|
||||
(LPBYTE)CURRENT_STACK16 - argsize, argsize );
|
||||
|
||||
context->Esp += LOWORD(context16.Esp) -
|
||||
@@ -344,7 +344,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
}
|
||||
DEFINE_REGS_ENTRYPOINT( OT_32ThkLSF )
|
||||
|
||||
@@ -1233,26 +1233,26 @@ void WINAPI __regs_K32Thk1632Prolog( CONTEXT *context )
|
||||
@@ -1234,26 +1234,26 @@ void WINAPI __regs_K32Thk1632Prolog( CONTEXT *context )
|
||||
DWORD argSize = context->Ebp - context->Esp;
|
||||
char *stack16 = (char *)context->Esp - 4;
|
||||
STACK16FRAME *frame16 = (STACK16FRAME *)stack16 - 1;
|
||||
@@ -375,7 +375,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
}
|
||||
|
||||
/* entry_point is never used again once the entry point has
|
||||
@@ -1275,7 +1275,7 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context )
|
||||
@@ -1276,7 +1276,7 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context )
|
||||
if ( code[5] == 0xFF && code[6] == 0x55 && code[7] == 0xFC
|
||||
&& code[13] == 0x66 && code[14] == 0xCB)
|
||||
{
|
||||
@@ -384,7 +384,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
char *stack16 = (char *)(frame16 + 1);
|
||||
DWORD argSize = frame16->ebp - (DWORD)stack16;
|
||||
char *stack32 = (char *)frame16->frame32 - argSize;
|
||||
@@ -1283,15 +1283,15 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context )
|
||||
@@ -1284,15 +1284,15 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context )
|
||||
DWORD nArgsPopped = context->Esp - (DWORD)stack32;
|
||||
|
||||
TRACE("before SYSTHUNK hack: EBP: %08x ESP: %08x cur_stack: %p\n",
|
||||
@@ -403,7 +403,7 @@ index 78925f594ba..141acb8d5e6 100644
|
||||
}
|
||||
}
|
||||
DEFINE_REGS_ENTRYPOINT( K32Thk1632Epilog )
|
||||
@@ -2302,7 +2302,7 @@ void WINAPI Throw16( LPCATCHBUF lpbuf, INT16 retval, CONTEXT *context )
|
||||
@@ -2303,7 +2303,7 @@ void WINAPI Throw16( LPCATCHBUF lpbuf, INT16 retval, CONTEXT *context )
|
||||
frame32 = pFrame->frame32;
|
||||
while (frame32 && frame32->frame16)
|
||||
{
|
||||
@@ -472,11 +472,11 @@ index 2dddbf93289..3a4b104a673 100644
|
||||
SYSLEVEL_CheckNotLevel( 2 );
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
||||
index e905ed0af17..8a976f7745d 100644
|
||||
--- a/dlls/ntdll/signal_i386.c
|
||||
+++ b/dlls/ntdll/signal_i386.c
|
||||
@@ -912,7 +912,7 @@ static inline void *init_handler( const ucontext_t *sigcontext, WORD *fs, WORD *
|
||||
diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
|
||||
index 2928f314358..138f56b94eb 100644
|
||||
--- a/dlls/ntdll/unix/signal_i386.c
|
||||
+++ b/dlls/ntdll/unix/signal_i386.c
|
||||
@@ -645,7 +645,7 @@ static inline void *init_handler( const ucontext_t *sigcontext )
|
||||
* SS is still non-system segment. This is why both CS and SS
|
||||
* are checked.
|
||||
*/
|
||||
@@ -630,7 +630,7 @@ index bf86719325b..1f53bdc9540 100644
|
||||
/* don't use WIN_Handle32 here, we don't care about the full handle */
|
||||
return IsWindow( HWND_32(hwnd) );
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index dd63300d915..0aa0ac311c3 100644
|
||||
index acbce20c212..68c1ae3fd82 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -362,7 +362,7 @@ typedef struct _TEB
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e60eb454ecfb4c043a585c1ecd2970c92be1c664 Mon Sep 17 00:00:00 2001
|
||||
From 0c4d2573b123f2198f74292133b7a6eefa472620 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 11 May 2017 05:32:55 +0200
|
||||
Subject: [PATCH] winebuild: Generate syscall thunks for ntdll exports.
|
||||
@@ -22,7 +22,7 @@ Based on a patch by Erich E. Hoover.
|
||||
14 files changed, 214 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index ffbc9fabb23..a633099877d 100644
|
||||
index 0c8f05285c4..26c540050dc 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3810,6 +3810,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
|
||||
@@ -39,23 +39,23 @@ index ffbc9fabb23..a633099877d 100644
|
||||
|
||||
+ NtCurrentTeb()->WOW32Reserved = __wine_syscall_dispatcher;
|
||||
+
|
||||
pthread_sigmask( SIG_UNBLOCK, &server_block_set, NULL );
|
||||
|
||||
if (process_detaching) return;
|
||||
|
||||
RtlEnterCriticalSection( &loader_section );
|
||||
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
||||
index 3be6342a945..85329be4f42 100644
|
||||
index 21cc1b3ead4..18be5693a7d 100644
|
||||
--- a/dlls/ntdll/signal_i386.c
|
||||
+++ b/dlls/ntdll/signal_i386.c
|
||||
@@ -444,6 +444,8 @@ struct stack_layout
|
||||
@@ -346,6 +346,8 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 4,
|
||||
"ret $4" )
|
||||
|
||||
static ULONG first_ldt_entry = 32;
|
||||
|
||||
+extern NTSTATUS WINAPI __syscall_NtGetContextThread( HANDLE handle, CONTEXT *context );
|
||||
+
|
||||
enum i386_trap_code
|
||||
{
|
||||
TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */
|
||||
@@ -1127,7 +1129,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
|
||||
/***********************************************************************
|
||||
* NtGetContextThread (NTDLL.@)
|
||||
* ZwGetContextThread (NTDLL.@)
|
||||
@@ -370,7 +372,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
|
||||
{
|
||||
context->Ebp = ebp;
|
||||
context->Esp = (DWORD)&retaddr;
|
||||
@@ -78,10 +78,10 @@ index a5e6faa461a..51938bf84cc 100644
|
||||
ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs );
|
||||
ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs );
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 49daa33ca58..17b5d40215a 100644
|
||||
index 5a6809638ae..fa10cdf1062 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -173,6 +173,7 @@ int __cdecl __wine_dbg_output( const char *str )
|
||||
@@ -170,6 +170,7 @@ int __cdecl __wine_dbg_output( const char *str )
|
||||
return unix_funcs->dbg_output( str );
|
||||
}
|
||||
|
||||
@@ -89,17 +89,17 @@ index 49daa33ca58..17b5d40215a 100644
|
||||
|
||||
/***********************************************************************
|
||||
* thread_init
|
||||
@@ -189,7 +190,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
|
||||
signal_init_early();
|
||||
|
||||
teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
|
||||
- &is_wow64, &server_start_time );
|
||||
+ &is_wow64, &server_start_time, __wine_syscall_dispatcher );
|
||||
@@ -181,7 +182,7 @@ int __cdecl __wine_dbg_output( const char *str )
|
||||
TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
|
||||
{
|
||||
TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
|
||||
- &is_wow64, &server_start_time );
|
||||
+ &is_wow64, &server_start_time, __wine_syscall_dispatcher );
|
||||
|
||||
peb = teb->Peb;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
|
||||
index d4b7a51a627..bdc87e4b9cf 100644
|
||||
index 97b191e1a5b..2dbaa43e731 100644
|
||||
--- a/dlls/ntdll/unix/thread.c
|
||||
+++ b/dlls/ntdll/unix/thread.c
|
||||
@@ -85,7 +85,7 @@ static void pthread_exit_wrapper( int status )
|
||||
@@ -120,42 +120,42 @@ index d4b7a51a627..bdc87e4b9cf 100644
|
||||
thread_data->request_fd = -1;
|
||||
thread_data->reply_fd = -1;
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index 19104f0f5cc..bdf8bc99e3f 100644
|
||||
index 19dd216fc35..a1c48a52606 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -101,7 +101,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
|
||||
extern void CDECL server_init_process_done(void) DECLSPEC_HIDDEN;
|
||||
@@ -107,7 +107,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
|
||||
extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN;
|
||||
extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
|
||||
BOOL *suspend, unsigned int *cpus, BOOL *wow64,
|
||||
- timeout_t *start_time ) DECLSPEC_HIDDEN;
|
||||
+ timeout_t *start_time, void *syscall_handler ) DECLSPEC_HIDDEN;
|
||||
extern void CDECL DECLSPEC_NORETURN start_process( PRTL_THREAD_START_ROUTINE entry, BOOL suspend, void *relay ) DECLSPEC_HIDDEN;
|
||||
extern void CDECL DECLSPEC_NORETURN abort_thread( int status ) DECLSPEC_HIDDEN;
|
||||
extern void CDECL DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN;
|
||||
extern void CDECL DECLSPEC_NORETURN exit_process( int status ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_len ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index 6a751993421..4e39ed53786 100644
|
||||
index 4c580c49d13..4f0080db03d 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -28,7 +28,7 @@ struct ldt_copy;
|
||||
struct msghdr;
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 33
|
||||
+#define NTDLL_UNIXLIB_VERSION 34
|
||||
-#define NTDLL_UNIXLIB_VERSION 38
|
||||
+#define NTDLL_UNIXLIB_VERSION 39
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@@ -174,7 +174,7 @@ struct unix_funcs
|
||||
@@ -199,7 +199,7 @@ struct unix_funcs
|
||||
|
||||
/* thread/process functions */
|
||||
TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
|
||||
- BOOL *suspend, unsigned int *cpus, BOOL *wow64, timeout_t *start_time );
|
||||
+ BOOL *suspend, unsigned int *cpus, BOOL *wow64, timeout_t *start_time, void *syscall_handler );
|
||||
void (CDECL *start_process)( PRTL_THREAD_START_ROUTINE entry, BOOL suspend, void *relay );
|
||||
void (CDECL *abort_thread)( int status );
|
||||
void (CDECL *exit_thread)( int status );
|
||||
void (CDECL *exit_process)( int status );
|
||||
NTSTATUS (CDECL *get_thread_ldt_entry)( HANDLE handle, void *data, ULONG len, ULONG *ret_len );
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 9b8218c861f..ff6916c98e7 100644
|
||||
index 68c1ae3fd82..f2da9157aab 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -359,7 +359,7 @@ typedef struct _TEB
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 1c0ba3961674f316dba2d89042571b7863076f08 Mon Sep 17 00:00:00 2001
|
||||
From 167ad04157dd746ee9395afa9505fe00cc866f9b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 15 May 2017 16:27:56 +0200
|
||||
Subject: [PATCH] winebuild: Add stub functions in fake dlls.
|
||||
@@ -62,7 +62,7 @@ index 926fa913866..902907329c0 100644
|
||||
CloseHandle(map);
|
||||
CloseHandle(file);
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index b42cff8bcd4..b21d88bb13b 100644
|
||||
index 26c540050dc..09d3870c31a 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3811,6 +3811,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
|
||||
@@ -73,19 +73,19 @@ index b42cff8bcd4..b21d88bb13b 100644
|
||||
|
||||
/******************************************************************
|
||||
* LdrInitializeThunk (NTDLL.@)
|
||||
@@ -3829,6 +3830,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
@@ -3828,6 +3829,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
|
||||
|
||||
NtCurrentTeb()->WOW32Reserved = __wine_syscall_dispatcher;
|
||||
+ NtCurrentTeb()->Spare2 = (ULONG_PTR)__wine_fakedll_dispatcher;
|
||||
|
||||
pthread_sigmask( SIG_UNBLOCK, &server_block_set, NULL );
|
||||
if (process_detaching) return;
|
||||
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index ed77e4a2e98..a988d4c3e6b 100644
|
||||
index fa10cdf1062..4840f527e59 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -175,6 +175,39 @@ int __cdecl __wine_dbg_output( const char *str )
|
||||
@@ -172,6 +172,39 @@ int __cdecl __wine_dbg_output( const char *str )
|
||||
|
||||
extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
|
||||
|
||||
@@ -125,16 +125,16 @@ index ed77e4a2e98..a988d4c3e6b 100644
|
||||
/***********************************************************************
|
||||
* thread_init
|
||||
*
|
||||
@@ -190,6 +223,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
|
||||
|
||||
teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
|
||||
&is_wow64, &server_start_time, __wine_syscall_dispatcher );
|
||||
@@ -183,6 +216,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
|
||||
{
|
||||
TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
|
||||
&is_wow64, &server_start_time, __wine_syscall_dispatcher );
|
||||
+ teb->Spare2 = (ULONG_PTR)__wine_fakedll_dispatcher;
|
||||
|
||||
peb = teb->Peb;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 065f3d24f52..199b8fc52f2 100644
|
||||
index f2da9157aab..ce8021af503 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -398,7 +398,7 @@ typedef struct _TEB
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7a2dceb0c325caa23d55f4ed4747221b09885c85 Mon Sep 17 00:00:00 2001
|
||||
From a5b4feebd008daab008f72567fe0001da619030e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 7 Sep 2017 00:38:09 +0200
|
||||
Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
|
||||
8 files changed, 306 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index 1f525194ce7..21af7b4ce7a 100644
|
||||
index 95939ba6bde..ae5462f6e55 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -1574,7 +1574,7 @@ static void test_filenames(void)
|
||||
@@ -1573,7 +1573,7 @@ static void test_filenames(void)
|
||||
|
||||
static void test_FakeDLL(void)
|
||||
{
|
||||
@@ -27,7 +27,7 @@ index 1f525194ce7..21af7b4ce7a 100644
|
||||
NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL;
|
||||
IMAGE_EXPORT_DIRECTORY *dir;
|
||||
HMODULE module = GetModuleHandleA("ntdll.dll");
|
||||
@@ -1616,8 +1616,13 @@ static void test_FakeDLL(void)
|
||||
@@ -1615,8 +1615,13 @@ static void test_FakeDLL(void)
|
||||
|
||||
dll_func = (BYTE *)GetProcAddress(module, func_name);
|
||||
ok(dll_func != NULL, "%s: GetProcAddress returned NULL\n", func_name);
|
||||
@@ -42,10 +42,10 @@ index 1f525194ce7..21af7b4ce7a 100644
|
||||
todo_wine ok(0, "%s: Export is a stub-function, skipping\n", func_name);
|
||||
continue;
|
||||
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
|
||||
index 449e5814c2e..05cbd4b443b 100644
|
||||
index 2dbaa43e731..e1da90222d3 100644
|
||||
--- a/dlls/ntdll/unix/thread.c
|
||||
+++ b/dlls/ntdll/unix/thread.c
|
||||
@@ -108,7 +108,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
|
||||
@@ -110,7 +110,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
|
||||
dbg_init();
|
||||
server_init_process();
|
||||
info_size = server_init_thread( teb->Peb, suspend );
|
||||
@@ -55,23 +55,23 @@ index 449e5814c2e..05cbd4b443b 100644
|
||||
|
||||
if (size) *size = info_size;
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index 5f891d52e17..6ccd2ff6cc4 100644
|
||||
index a1c48a52606..9c9e5b80b0c 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -137,7 +137,7 @@ extern void virtual_init(void) DECLSPEC_HIDDEN;
|
||||
@@ -152,7 +152,7 @@ extern void virtual_init(void) DECLSPEC_HIDDEN;
|
||||
extern TEB *virtual_alloc_first_teb(void) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS virtual_alloc_teb( TEB **ret_teb ) DECLSPEC_HIDDEN;
|
||||
extern void virtual_free_teb( TEB *teb ) DECLSPEC_HIDDEN;
|
||||
-extern void virtual_map_user_shared_data(void) DECLSPEC_HIDDEN;
|
||||
+extern void virtual_map_user_shared_data(void *) DECLSPEC_HIDDEN;
|
||||
|
||||
extern void signal_init_threading(void) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) DECLSPEC_HIDDEN;
|
||||
extern BOOL virtual_is_valid_code_address( const void *addr, SIZE_T size ) DECLSPEC_HIDDEN;
|
||||
extern int virtual_handle_stack_fault( void *addr ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 83e51c369cb..40629214479 100644
|
||||
index 660323d4dcc..a5e5cb8422d 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -2742,14 +2742,14 @@ TEB *virtual_alloc_first_teb(void)
|
||||
@@ -2588,14 +2588,14 @@ TEB *virtual_alloc_first_teb(void)
|
||||
TEB *teb;
|
||||
PEB *peb;
|
||||
NTSTATUS status;
|
||||
@@ -88,7 +88,7 @@ index 83e51c369cb..40629214479 100644
|
||||
if (status)
|
||||
{
|
||||
ERR( "wine: failed to map the shared user data: %08x\n", status );
|
||||
@@ -2943,11 +2943,12 @@ void virtual_clear_thread_stack( void *stack_end )
|
||||
@@ -2787,11 +2787,12 @@ void virtual_clear_thread_stack( void *stack_end )
|
||||
if (force_exec_prot) mprotect( stack, size, PROT_READ | PROT_WRITE | PROT_EXEC );
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ index 83e51c369cb..40629214479 100644
|
||||
{
|
||||
static const WCHAR wine_usdW[] = {'\\','K','e','r','n','e','l','O','b','j','e','c','t','s',
|
||||
'\\','_','_','w','i','n','e','_','u','s','e','r','_','s','h','a','r','e','d','_','d','a','t','a',0};
|
||||
@@ -2970,6 +2971,11 @@ void virtual_map_user_shared_data(void)
|
||||
@@ -2814,6 +2815,11 @@ void virtual_map_user_shared_data(void)
|
||||
ERR( "failed to remap the process USD: %d\n", res );
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user