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 48020f4846cca1a02f4e1dc037e2cc2068df5e9c.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 505b2a7167d4b0ea533663ef30663f21b0ab9863 Mon Sep 17 00:00:00 2001
|
||||
From 3b9456b9e0bc870281df2144b67d42112baad4bd 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.
|
||||
@@ -18,7 +18,7 @@ Based on a patch by Erich E. Hoover.
|
||||
10 files changed, 208 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
||||
index 5fd54071ffd..950408cbc38 100644
|
||||
index eb6c87bce4d..d3cbfe63f1c 100644
|
||||
--- a/dlls/ntdll/signal_i386.c
|
||||
+++ b/dlls/ntdll/signal_i386.c
|
||||
@@ -449,6 +449,8 @@ static ULONG first_ldt_entry = 32;
|
||||
@@ -30,15 +30,15 @@ index 5fd54071ffd..950408cbc38 100644
|
||||
enum i386_trap_code
|
||||
{
|
||||
TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */
|
||||
@@ -1487,7 +1489,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
|
||||
{
|
||||
context->Ebp = ebp;
|
||||
context->Esp = (DWORD)&retaddr;
|
||||
- context->Eip = *(&edi - 1);
|
||||
+ context->Eip = (DWORD)__syscall_NtGetContextThread + 18;
|
||||
context->SegCs = get_cs();
|
||||
context->SegSs = get_ds();
|
||||
context->EFlags = eflags;
|
||||
@@ -1275,7 +1277,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
|
||||
{
|
||||
context->Ebp = ebp;
|
||||
context->Esp = (DWORD)&retaddr;
|
||||
- context->Eip = *(&edi - 1);
|
||||
+ context->Eip = (DWORD)__syscall_NtGetContextThread + 18;
|
||||
context->EFlags = eflags;
|
||||
}
|
||||
return unix_funcs->NtGetContextThread( handle, context );
|
||||
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
|
||||
index a5e6faa461a..51938bf84cc 100644
|
||||
--- a/dlls/ntdll/tests/exception.c
|
||||
@@ -53,7 +53,7 @@ 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 bb11521cf69..edd6c4dfa99 100644
|
||||
index f9ea9203ed8..7e435c4ccb3 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -212,6 +212,8 @@ void map_user_shared_data(void)
|
||||
@@ -65,15 +65,15 @@ index bb11521cf69..edd6c4dfa99 100644
|
||||
/***********************************************************************
|
||||
* thread_init
|
||||
*
|
||||
@@ -248,6 +250,7 @@ TEB *thread_init(void)
|
||||
@@ -246,6 +248,7 @@ TEB *thread_init(void)
|
||||
|
||||
teb = unix_funcs->virtual_alloc_first_teb();
|
||||
unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy );
|
||||
unix_funcs->alloc_thread( teb );
|
||||
unix_funcs->init_thread( teb );
|
||||
+ teb->WOW32Reserved = __wine_syscall_dispatcher;
|
||||
|
||||
peb = teb->Peb;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
@@ -493,6 +496,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
|
||||
@@ -491,6 +494,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
|
||||
teb->Tib.StackBase = stack.StackBase;
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 22a245956909fc1cd3a733d460441bb05d09c775 Mon Sep 17 00:00:00 2001
|
||||
From 724fec1afabf68217dc161e0f784a8b65c2c5854 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.
|
||||
@@ -61,7 +61,7 @@ index 926fa913866..902907329c0 100644
|
||||
CloseHandle(map);
|
||||
CloseHandle(file);
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index edd6c4dfa99..678af513264 100644
|
||||
index 7e435c4ccb3..5148445ce3a 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -214,6 +214,39 @@ void map_user_shared_data(void)
|
||||
@@ -104,15 +104,15 @@ index edd6c4dfa99..678af513264 100644
|
||||
/***********************************************************************
|
||||
* thread_init
|
||||
*
|
||||
@@ -251,6 +284,7 @@ TEB *thread_init(void)
|
||||
unix_funcs->alloc_thread( teb );
|
||||
unix_funcs->init_thread( teb );
|
||||
@@ -249,6 +282,7 @@ TEB *thread_init(void)
|
||||
teb = unix_funcs->virtual_alloc_first_teb();
|
||||
unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy );
|
||||
teb->WOW32Reserved = __wine_syscall_dispatcher;
|
||||
+ teb->Spare2 = (ULONG_PTR)__wine_fakedll_dispatcher;
|
||||
|
||||
peb = teb->Peb;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
@@ -497,6 +531,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
|
||||
@@ -495,6 +529,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
teb->WOW32Reserved = __wine_syscall_dispatcher;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From fa2f2b41cb6af594457b76ba90c042387c368ef6 Mon Sep 17 00:00:00 2001
|
||||
From 253d27816a1eb43b54834a12aa4c55442b0b1062 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.
|
||||
@@ -40,7 +40,7 @@ index 95939ba6bde..ae5462f6e55 100644
|
||||
todo_wine ok(0, "%s: Export is a stub-function, skipping\n", func_name);
|
||||
continue;
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 678af513264..297893d8898 100644
|
||||
index 5148445ce3a..c9a2240a4da 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -54,6 +54,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(thread);
|
||||
@@ -77,7 +77,7 @@ index 678af513264..297893d8898 100644
|
||||
+
|
||||
/* allocate and initialize the PEB and initial TEB */
|
||||
|
||||
teb = virtual_alloc_first_teb();
|
||||
teb = unix_funcs->virtual_alloc_first_teb();
|
||||
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
|
||||
index 4597a6cb324..3d0d75e9c6d 100644
|
||||
--- a/libs/wine/loader.c
|
||||
|
||||
Reference in New Issue
Block a user