The package rpms/wine.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/wine.git/commit/?id=faadc28cc0665...
https://src.fedoraproject.org/cgit/rpms/wine.git/commit/?id=b6dc9f8efeed3...
https://src.fedoraproject.org/cgit/rpms/wine.git/commit/?id=ed2472170e1a0...
https://src.fedoraproject.org/cgit/rpms/wine.git/commit/?id=6a3375aed7da5...
https://src.fedoraproject.org/cgit/rpms/wine.git/commit/?id=41fb9606e6f1c....
Change:
+%ifarch %{arm} aarch64
-%ifarch %{arm} aarch64
+%ifarch %{arm} aarch64
-%ifarch aarch64
+%ifarch aarch64
Thanks.
Full change:
============
commit faadc28cc066527eeae214364effc049183878d9
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Thu Jun 11 08:59:39 2020 -0500
Backout arm patches due to code rebase by upstream, this will be included in 5.11
diff --git a/wine-staging-5.10-ntdll-arm0.patch b/wine-staging-5.10-ntdll-arm0.patch
deleted file mode 100644
index 74f1f00..0000000
--- a/wine-staging-5.10-ntdll-arm0.patch
+++ /dev/null
@@ -1,964 +0,0 @@
-From 9a4c8c5631101f8571dbdce726ae864060e446c9 Mon Sep 17 00:00:00 2001
-From: Zebediah Figura <z.figura12(a)gmail.com>
-Date: Mon, 8 Jun 2020 15:59:31 -0500
-Subject: [PATCH] Rebase against 17529582402ebe27ef975fc7dcb8353f4f95e629.
-
----
- ...ase-Maintain-FLS-storage-list-in-PEB.patch | 44 ++--
- .../0001-ntdll-Add-stub-for-NtContinue.patch | 63 ------
- ...o-continue-execution-after-exception.patch | 82 --------
- patches/ntdll-NtContinue/definition | 3 -
- ...dll-Support-x86_64-syscall-emulation.patch | 14 +-
- ...mporary-signal-handler-during-proces.patch | 32 +--
- patches/patchinstall.sh | 198 ++++++++----------
- ...ate-syscall-thunks-for-ntdll-exports.patch | 34 +--
- ...e-client-side-file-descriptor-cache-.patch | 20 +-
- staging/upstream-commit | 2 +-
- 10 files changed, 156 insertions(+), 336 deletions(-)
- delete mode 100644 patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
- delete mode 100644
patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
- delete mode 100644 patches/ntdll-NtContinue/definition
-
-diff --git
a/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
b/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
-index 1d5434bf6..40f2a0b86 100644
---- a/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
-+++ b/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
-@@ -1,4 +1,4 @@
--From 5c370d9f0be803d89302da7471ef0b93b45a0d75 Mon Sep 17 00:00:00 2001
-+From 3fe24d6e3b216c21b6a7b68766414213fdd2ff2d Mon Sep 17 00:00:00 2001
- From: Paul Gofman <pgofman(a)codeweavers.com>
- Date: Thu, 23 Apr 2020 14:32:23 +0300
- Subject: [PATCH] kernelbase: Maintain FLS storage list in PEB.
-@@ -73,10 +73,10 @@ index 7501165dc87..2bcc3ee60c4 100644
- * FlsFree should fail
- * FlsGetValue and FlsSetValue should succeed
- diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
--index a454bf118cc..dac30959734 100644
-+index a9869863b44..b24f9e98bc7 100644
- --- a/dlls/kernel32/tests/thread.c
- +++ b/dlls/kernel32/tests/thread.c
--@@ -2435,7 +2435,6 @@ START_TEST(thread)
-+@@ -2377,7 +2377,6 @@ START_TEST(thread)
- }
- return;
- }
-@@ -84,7 +84,7 @@ index a454bf118cc..dac30959734 100644
- test_thread_info();
- test_reserved_tls();
- test_CreateRemoteThread();
--@@ -2463,6 +2462,5 @@ START_TEST(thread)
-+@@ -2405,6 +2404,5 @@ START_TEST(thread)
- test_thread_fpu_cw();
- test_thread_actctx();
- test_thread_description();
-@@ -92,7 +92,7 @@ index a454bf118cc..dac30959734 100644
- test_threadpool();
- }
- diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c
--index 03b16da95bb..4409f120491 100644
-+index f20d460d07d..3c77b6a42f4 100644
- --- a/dlls/kernelbase/thread.c
- +++ b/dlls/kernelbase/thread.c
- @@ -38,6 +38,10 @@
-@@ -106,7 +106,7 @@ index 03b16da95bb..4409f120491 100644
-
- /***********************************************************************
- * Threads
--@@ -916,6 +920,19 @@ static void init_fiber_context( struct fiber_data *fiber )
-+@@ -915,6 +919,19 @@ static void init_fiber_context( struct fiber_data *fiber )
- #endif
- }
-
-@@ -126,7 +126,7 @@ index 03b16da95bb..4409f120491 100644
-
- /***********************************************************************
- * CreateFiber (kernelbase.@)
--@@ -1023,7 +1040,16 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr )
-+@@ -1022,7 +1039,16 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr )
- RtlExitUserThread( 1 );
- }
- RtlFreeUserStack( fiber->stack_allocation );
-@@ -144,7 +144,7 @@ index 03b16da95bb..4409f120491 100644
- HeapFree( GetProcessHeap(), 0, fiber );
- }
-
--@@ -1045,6 +1071,19 @@ void WINAPI DECLSPEC_HOTPATCH SwitchToFiber( LPVOID fiber )
-+@@ -1044,6 +1070,19 @@ void WINAPI DECLSPEC_HOTPATCH SwitchToFiber( LPVOID fiber )
- struct fiber_data *new_fiber = fiber;
- struct fiber_data *current_fiber = NtCurrentTeb()->Tib.u.FiberData;
-
-@@ -164,7 +164,7 @@ index 03b16da95bb..4409f120491 100644
- current_fiber->except = NtCurrentTeb()->Tib.ExceptionList;
- current_fiber->stack_limit = NtCurrentTeb()->Tib.StackLimit;
- current_fiber->fls_slots = NtCurrentTeb()->FlsSlots;
--@@ -1070,9 +1109,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
-+@@ -1069,9 +1108,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
- PEB * const peb = NtCurrentTeb()->Peb;
-
- RtlAcquirePebLock();
-@@ -175,7 +175,7 @@ index 03b16da95bb..4409f120491 100644
- {
- SetLastError( ERROR_NOT_ENOUGH_MEMORY );
- index = FLS_OUT_OF_INDEXES;
--@@ -1082,9 +1119,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
-+@@ -1081,9 +1118,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
- index = RtlFindClearBitsAndSet( peb->FlsBitmap, 1, 1 );
- if (index != ~0U)
- {
-@@ -186,7 +186,7 @@ index 03b16da95bb..4409f120491 100644
- {
- RtlClearBits( peb->FlsBitmap, index, 1 );
- index = FLS_OUT_OF_INDEXES;
--@@ -1092,8 +1127,8 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
-+@@ -1091,8 +1126,8 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
- }
- else
- {
-@@ -197,7 +197,7 @@ index 03b16da95bb..4409f120491 100644
- }
- }
- else SetLastError( ERROR_NO_MORE_ITEMS );
--@@ -1117,7 +1152,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsFree( DWORD index )
-+@@ -1116,7 +1151,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsFree( DWORD index )
- {
- /* FIXME: call Fls callback */
- /* FIXME: add equivalent of ThreadZeroTlsCell here */
-@@ -206,7 +206,7 @@ index 03b16da95bb..4409f120491 100644
- }
- else SetLastError( ERROR_INVALID_PARAMETER );
- RtlReleasePebLock();
--@@ -1136,7 +1171,7 @@ PVOID WINAPI DECLSPEC_HOTPATCH FlsGetValue( DWORD index )
-+@@ -1135,7 +1170,7 @@ PVOID WINAPI DECLSPEC_HOTPATCH FlsGetValue( DWORD index )
- return NULL;
- }
- SetLastError( ERROR_SUCCESS );
-@@ -215,7 +215,7 @@ index 03b16da95bb..4409f120491 100644
- }
-
-
--@@ -1150,14 +1185,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsSetValue( DWORD index, PVOID
data )
-+@@ -1149,14 +1184,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsSetValue( DWORD index, PVOID
data )
- SetLastError( ERROR_INVALID_PARAMETER );
- return FALSE;
- }
-@@ -233,10 +233,10 @@ index 03b16da95bb..4409f120491 100644
- }
-
- diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
--index 5e8de8821dd..71ef1cfea0a 100644
-+index ffbc9fabb23..be53d98e5b8 100644
- --- a/dlls/ntdll/loader.c
- +++ b/dlls/ntdll/loader.c
--@@ -179,6 +179,15 @@ static CRITICAL_SECTION_DEBUG dlldir_critsect_debug =
-+@@ -169,6 +169,15 @@ static CRITICAL_SECTION_DEBUG dlldir_critsect_debug =
- };
- static CRITICAL_SECTION dlldir_section = { &dlldir_critsect_debug, -1, 0, 0, 0, 0
};
-
-@@ -252,7 +252,7 @@ index 5e8de8821dd..71ef1cfea0a 100644
- static WINE_MODREF *cached_modref;
- static WINE_MODREF *current_modref;
- static WINE_MODREF *last_failed_modref;
--@@ -219,6 +228,16 @@ static RTL_UNLOAD_EVENT_TRACE
unload_traces[RTL_UNLOAD_EVENT_TRACE_NUMBER];
-+@@ -209,6 +218,16 @@ static RTL_UNLOAD_EVENT_TRACE
unload_traces[RTL_UNLOAD_EVENT_TRACE_NUMBER];
- static RTL_UNLOAD_EVENT_TRACE *unload_trace_ptr;
- static unsigned int unload_trace_seq;
-
-@@ -269,7 +269,7 @@ index 5e8de8821dd..71ef1cfea0a 100644
- static void module_push_unload_trace( const LDR_DATA_TABLE_ENTRY *ldr )
- {
- RTL_UNLOAD_EVENT_TRACE *ptr = &unload_traces[unload_trace_seq];
--@@ -3913,6 +3932,13 @@ void WINAPI LdrShutdownThread(void)
-+@@ -3610,6 +3629,13 @@ void WINAPI LdrShutdownThread(void)
- /* don't do any detach calls if process is exiting */
- if (process_detaching) return;
-
-@@ -283,15 +283,15 @@ index 5e8de8821dd..71ef1cfea0a 100644
- RtlEnterCriticalSection( &loader_section );
-
- mark =
&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
--@@ -4153,6 +4179,7 @@ static void user_shared_data_init(void)
-+@@ -3819,6 +3845,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
- */
- void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknown3,
ULONG_PTR unknown4 )
- {
- + static const unsigned int fls_slot_count = 8 *
sizeof(NtCurrentTeb()->Peb->FlsBitmapBits);
-- static const LARGE_INTEGER zero;
- static int attach_done;
- int i;
--@@ -4191,6 +4218,25 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
-+ NTSTATUS status;
-+@@ -3856,6 +3883,25 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
- InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
- RtlReleasePebLock();
-
-@@ -318,5 +318,5 @@ index 5e8de8821dd..71ef1cfea0a 100644
- {
- attach_done = 1;
- --
--2.25.3
-+2.26.2
-
-diff --git a/patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
b/patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
-deleted file mode 100644
-index 7145857bd..000000000
---- a/patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
-+++ /dev/null
-@@ -1,63 +0,0 @@
--From 9ea4f081689959bd393eab2caaa0ed8237846117 Mon Sep 17 00:00:00 2001
--From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
--Date: Thu, 25 May 2017 05:04:26 +0200
--Subject: [PATCH] ntdll: Add stub for NtContinue.
--
-----
-- dlls/ntdll/exception.c | 10 +++++++++-
-- dlls/ntdll/ntdll.spec | 4 ++--
-- 2 files changed, 11 insertions(+), 3 deletions(-)
--
--diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
--index c35312fd1d1..3b85f1efa04 100644
----- a/dlls/ntdll/exception.c
--+++ b/dlls/ntdll/exception.c
--@@ -328,7 +328,6 @@ LONG WINAPI call_unhandled_exception_filter( PEXCEPTION_POINTERS
eptr )
-- return unhandled_exception_filter( eptr );
-- }
--
---
-- #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
--
-- struct dynamic_unwind_entry
--@@ -667,6 +666,15 @@ PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry( ULONG_PTR pc,
ULONG_PTR *base,
--
-- #endif /* __x86_64__ || __arm__ || __aarch64__ */
--
--+/*********************************************************************
--+ * NtContinue (NTDLL.@)
--+ */
--+NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alert )
--+{
--+ FIXME( "(%p, %d) stub!\n", context, alert );
--+ return STATUS_NOT_IMPLEMENTED;
--+}
--+
-- /*************************************************************
-- * __wine_spec_unimplemented_stub
-- *
--diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
--index 81faf7fc280..d21a6f08ac2 100644
----- a/dlls/ntdll/ntdll.spec
--+++ b/dlls/ntdll/ntdll.spec
--@@ -150,7 +150,7 @@
-- @ stdcall NtCompleteConnectPort(ptr)
-- # @ stub NtCompressKey
-- @ stdcall NtConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr)
---@ stub NtContinue
--+@ stdcall NtContinue(ptr long)
-- # @ stub NtCreateDebugObject
-- @ stdcall NtCreateDirectoryObject(ptr long ptr)
-- @ stdcall NtCreateEvent(ptr long ptr long long)
--@@ -1105,7 +1105,7 @@
-- @ stdcall -private ZwCompleteConnectPort(ptr) NtCompleteConnectPort
-- # @ stub ZwCompressKey
-- @ stdcall -private ZwConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr) NtConnectPort
---@ stub ZwContinue
--+@ stdcall -private ZwContinue(ptr long) NtContinue
-- # @ stub ZwCreateDebugObject
-- @ stdcall -private ZwCreateDirectoryObject(ptr long ptr) NtCreateDirectoryObject
-- @ stdcall -private ZwCreateEvent(ptr long ptr long long) NtCreateEvent
----
--2.17.1
--
-diff --git
a/patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
b/patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
-deleted file mode 100644
-index 902940977..000000000
----
a/patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
-+++ /dev/null
-@@ -1,82 +0,0 @@
--From 812de54c6fc8f93e8fda01f0802397b183adab59 Mon Sep 17 00:00:00 2001
--From: Andrew Wesie <awesie(a)gmail.com>
--Date: Fri, 27 Jul 2018 01:26:56 -0500
--Subject: [PATCH] ntdll: Use NtContinue to continue execution after exceptions.
--
--NtContinue is exported by ntdll and some programs expect it to be used to
--restore the thread context after an exception handler returns
--EXCEPTION_CONTINUE_EXECUTION. It must take a context as its first argument
--and restore that context.
--
--Current implementation is a simple wrapper around NtSetContextThread. It is
--unlikely that it has the correct behavior if called by an external caller.
--
--The __syscall_NtContinue wrapper is used so that it can be hooked by a
--third-party.
-----
-- dlls/ntdll/exception.c | 5 +++--
-- dlls/ntdll/signal_i386.c | 3 ++-
-- dlls/ntdll/signal_x86_64.c | 3 ++-
-- 3 files changed, 7 insertions(+), 4 deletions(-)
--
--diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
--index 3b85f1efa..bc972254f 100644
----- a/dlls/ntdll/exception.c
--+++ b/dlls/ntdll/exception.c
--@@ -671,8 +671,9 @@ PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry( ULONG_PTR pc,
ULONG_PTR *base,
-- */
-- NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alert )
-- {
--- FIXME( "(%p, %d) stub!\n", context, alert );
--- return STATUS_NOT_IMPLEMENTED;
--+ TRACE( "(%p, %d) stub!\n", context, alert );
--+
--+ return NtSetContextThread( GetCurrentThread(), context );
-- }
--
-- /*************************************************************
--diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
--index e55164630..8fc885ed4 100644
----- a/dlls/ntdll/signal_i386.c
--+++ b/dlls/ntdll/signal_i386.c
--@@ -730,6 +730,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT
*context )
-- return STATUS_UNHANDLED_EXCEPTION;
-- }
--
--+NTSTATUS WINAPI __syscall_NtContinue( CONTEXT *context, BOOLEAN alert );
--
-- /*******************************************************************
-- * raise_exception
--@@ -794,7 +795,7 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT
*context, BOOL f
-- NtTerminateProcess( NtCurrentProcess(), rec->ExceptionCode );
-- }
-- done:
--- return NtSetContextThread( GetCurrentThread(), context );
--+ return __syscall_NtContinue( context, FALSE );
-- }
--
--
--diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
--index e48529d73..0e74fda43 100644
----- a/dlls/ntdll/signal_x86_64.c
--+++ b/dlls/ntdll/signal_x86_64.c
--@@ -2520,6 +2520,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec,
CONTEXT *orig_contex
-- return STATUS_UNHANDLED_EXCEPTION;
-- }
--
--+NTSTATUS WINAPI __syscall_NtContinue( CONTEXT *context, BOOLEAN alert );
--
-- static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
first_chance )
-- {
--@@ -2582,7 +2583,7 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT
*context, BOOL f
-- }
--
-- done:
--- return NtSetContextThread( GetCurrentThread(), context );
--+ return __syscall_NtContinue( context, FALSE );
-- }
--
--
----
--2.23.0
--
-diff --git a/patches/ntdll-NtContinue/definition b/patches/ntdll-NtContinue/definition
-deleted file mode 100644
-index 06c2ebf9e..000000000
---- a/patches/ntdll-NtContinue/definition
-+++ /dev/null
-@@ -1,3 +0,0 @@
--Fixes: [31910] Add stub for NtContinue
--Fixes: [45572] League of Legends 8.12+ fails to start a game (anticheat engine, hooking
of NtContinue)
--Depends: winebuild-Fake_Dlls
-\ No newline at end of file
-diff --git
a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
-index 4ae5fcdfa..0a39d4355 100644
---- a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
-+++ b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
-@@ -1,4 +1,4 @@
--From 20298be5a42af52be27c56f88ad6a8a0304b55b6 Mon Sep 17 00:00:00 2001
-+From cd04d1910294b035bb3858b3ef1bb295aec3a732 Mon Sep 17 00:00:00 2001
- From: Paul Gofman <pgofman(a)codeweavers.com>
- Date: Mon, 30 Dec 2019 13:27:53 +0300
- Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
-@@ -15,7 +15,7 @@ is used for trapping syscalls.
- 3 files changed, 119 insertions(+), 2 deletions(-)
-
- diff --git a/configure.ac b/configure.ac
--index e3d63ed7501..2fbec4129df 100644
-+index e61a98455c3..4adeb52d225 100644
- --- a/configure.ac
- +++ b/configure.ac
- @@ -464,6 +464,7 @@ AC_CHECK_HEADERS(\
-@@ -27,7 +27,7 @@ index e3d63ed7501..2fbec4129df 100644
- linux/types.h \
- linux/ucdrom.h \
- diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
--index 0ccc7cbceb6..149ad1bf5e7 100644
-+index dd8b45fa907..a5612abf2b1 100644
- --- a/dlls/ntdll/signal_x86_64.c
- +++ b/dlls/ntdll/signal_x86_64.c
- @@ -24,6 +24,7 @@
-@@ -61,8 +61,8 @@ index 0ccc7cbceb6..149ad1bf5e7 100644
- typedef struct _SCOPE_TABLE
- {
- ULONG Count;
--@@ -2797,6 +2807,104 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void
*ucontext )
-- restore_context( &context, ucontext );
-+@@ -2480,6 +2490,104 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
-+ return 0;
- }
-
- +extern unsigned int __wine_nb_syscalls;
-@@ -165,8 +165,8 @@ index 0ccc7cbceb6..149ad1bf5e7 100644
- +}
-
- /***********************************************************************
-- * __wine_set_signal_handler (NTDLL.@)
--@@ -2842,6 +2950,9 @@ void signal_init_process(void)
-+ * handle_interrupt
-+@@ -2793,6 +2901,9 @@ void signal_init_process(void)
- sig_act.sa_sigaction = trap_handler;
- if (sigaction( SIGTRAP, &sig_act, NULL ) == -1) goto error;
- #endif
-diff --git
a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
-index d6e9a6824..db0631234 100644
----
a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
-+++
b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
-@@ -1,4 +1,4 @@
--From 46968c583a30476a86463530d0047699e64529b5 Mon Sep 17 00:00:00 2001
-+From bd60a4308f3ec1df20328887335b4c95f9be215d Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Sat, 4 Oct 2014 02:53:22 +0200
- Subject: [PATCH] ntdll: Setup a temporary signal handler during process
-@@ -27,10 +27,10 @@ index 65c65cc02d8..63a4b597872 100644
- extern void debug_init(void) DECLSPEC_HIDDEN;
- extern TEB *thread_init( SIZE_T *info_size, BOOL *suspend ) DECLSPEC_HIDDEN;
- diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c
--index 8ff9f66d3f0..44e3d2df523 100644
-+index a09848449a6..c6f7231fec6 100644
- --- a/dlls/ntdll/signal_arm.c
- +++ b/dlls/ntdll/signal_arm.c
--@@ -773,6 +773,12 @@ void signal_init_process(void)
-+@@ -792,6 +792,12 @@ void signal_init_process(void)
- exit(1);
- }
-
-@@ -44,11 +44,11 @@ index 8ff9f66d3f0..44e3d2df523 100644
- /***********************************************************************
- * RtlUnwind (NTDLL.@)
- diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
--index 104ffbf6df9..e7c6abd0046 100644
-+index a9a58a2e7ad..a9c6614794e 100644
- --- a/dlls/ntdll/signal_arm64.c
- +++ b/dlls/ntdll/signal_arm64.c
--@@ -1100,6 +1100,12 @@ int CDECL __wine_set_signal_handler(unsigned int sig,
wine_signal_handler wsh)
-- return 0;
-+@@ -1047,6 +1047,12 @@ static void usr2_handler( int signal, siginfo_t *siginfo, void
*sigcontext )
-+ restore_context( context, sigcontext );
- }
-
- +/**********************************************************************
-@@ -61,10 +61,10 @@ index 104ffbf6df9..e7c6abd0046 100644
- /**********************************************************************
- * signal_init_process
- diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
--index 1b0b9352a87..0fe9f7a3c84 100644
-+index 83868f25121..b048b2bc688 100644
- --- a/dlls/ntdll/signal_i386.c
- +++ b/dlls/ntdll/signal_i386.c
--@@ -1621,6 +1621,31 @@ static BOOL handle_interrupt( unsigned int interrupt, ucontext_t
*sigcontext, st
-+@@ -1575,6 +1575,31 @@ static BOOL handle_interrupt( unsigned int interrupt, ucontext_t
*sigcontext, st
- }
-
-
-@@ -96,7 +96,7 @@ index 1b0b9352a87..0fe9f7a3c84 100644
- /**********************************************************************
- * segv_handler
- *
--@@ -1948,6 +1973,34 @@ void signal_init_process(void)
-+@@ -1883,6 +1908,34 @@ void signal_init_process(void)
- exit(1);
- }
-
-@@ -132,11 +132,11 @@ index 1b0b9352a87..0fe9f7a3c84 100644
- /*******************************************************************
- * RtlUnwind (NTDLL.@)
- diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c
--index 7e73322cbeb..07f0b89f30a 100644
-+index 879b2b58c49..f17d6267102 100644
- --- a/dlls/ntdll/signal_powerpc.c
- +++ b/dlls/ntdll/signal_powerpc.c
--@@ -637,6 +637,12 @@ int CDECL __wine_set_signal_handler(unsigned int sig,
wine_signal_handler wsh)
-- return 0;
-+@@ -634,6 +634,12 @@ static void quit_handler( int signal, siginfo_t *siginfo, void
*sigcontext )
-+ unix_funcs->abort_thread(0);
- }
-
- +/**********************************************************************
-@@ -147,12 +147,12 @@ index 7e73322cbeb..07f0b89f30a 100644
- +}
-
- /**********************************************************************
-- * signal_init_process
-+ * usr1_handler
- diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
--index 0ccc7cbceb6..dc8a1a987c5 100644
-+index c6b0fbf618d..bb481ba1b81 100644
- --- a/dlls/ntdll/signal_x86_64.c
- +++ b/dlls/ntdll/signal_x86_64.c
--@@ -2849,6 +2849,12 @@ void signal_init_process(void)
-+@@ -2777,6 +2777,12 @@ void signal_init_process(void)
- exit(1);
- }
-
-@@ -166,7 +166,7 @@ index 0ccc7cbceb6..dc8a1a987c5 100644
- static ULONG64 get_int_reg( CONTEXT *context, int reg )
- {
- diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
--index 8918b39a9c5..a2f5df1b1c2 100644
-+index d045466f6d2..49daa33ca58 100644
- --- a/dlls/ntdll/thread.c
- +++ b/dlls/ntdll/thread.c
- @@ -186,6 +186,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
-diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh
-index c5ff8c0b3..9c2ce4ce0 100755
---- a/patches/patchinstall.sh
-+++ b/patches/patchinstall.sh
-@@ -52,7 +52,7 @@ usage()
- # Get the upstream commit sha
- upstream_commit()
- {
-- echo "3cc3b445752902e07231900befc296f74ad6576e"
-+ echo "17529582402ebe27ef975fc7dcb8353f4f95e629"
- }
-
- # Show version information
-@@ -183,7 +183,6 @@ patch_enable_all ()
- enable_ntdll_Junction_Points="$1"
- enable_ntdll_Manifest_Range="$1"
- enable_ntdll_NtAccessCheck="$1"
-- enable_ntdll_NtContinue="$1"
- enable_ntdll_NtDevicePath="$1"
- enable_ntdll_NtQueryEaFile="$1"
- enable_ntdll_NtQuerySection="$1"
-@@ -648,9 +647,6 @@ patch_enable ()
- ntdll-NtAccessCheck)
- enable_ntdll_NtAccessCheck="$2"
- ;;
-- ntdll-NtContinue)
-- enable_ntdll_NtContinue="$2"
-- ;;
- ntdll-NtDevicePath)
- enable_ntdll_NtDevicePath="$2"
- ;;
-@@ -1672,6 +1668,17 @@ if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
- enable_winebuild_Fake_Dlls=1
- fi
-
-+if test "$enable_winebuild_Fake_Dlls" -eq 1; then
-+ if test "$enable_ntdll_WRITECOPY" -gt 1; then
-+ abort "Patchset ntdll-WRITECOPY disabled, but winebuild-Fake_Dlls depends on
that."
-+ fi
-+ if test "$enable_ws2_32_WSACleanup" -gt 1; then
-+ abort "Patchset ws2_32-WSACleanup disabled, but winebuild-Fake_Dlls depends on
that."
-+ fi
-+ enable_ntdll_WRITECOPY=1
-+ enable_ws2_32_WSACleanup=1
-+fi
-+
- if test "$enable_ntdll_NtQueryEaFile" -eq 1; then
- if test "$enable_ntdll_Junction_Points" -gt 1; then
- abort "Patchset ntdll-Junction_Points disabled, but ntdll-NtQueryEaFile depends
on that."
-@@ -1686,24 +1693,6 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then
- enable_ntdll_Pipe_SpecialCharacters=1
- fi
-
--if test "$enable_ntdll_NtContinue" -eq 1; then
-- if test "$enable_winebuild_Fake_Dlls" -gt 1; then
-- abort "Patchset winebuild-Fake_Dlls disabled, but ntdll-NtContinue depends on
that."
-- fi
-- enable_winebuild_Fake_Dlls=1
--fi
--
--if test "$enable_winebuild_Fake_Dlls" -eq 1; then
-- if test "$enable_ntdll_WRITECOPY" -gt 1; then
-- abort "Patchset ntdll-WRITECOPY disabled, but winebuild-Fake_Dlls depends on
that."
-- fi
-- if test "$enable_ws2_32_WSACleanup" -gt 1; then
-- abort "Patchset ws2_32-WSACleanup disabled, but winebuild-Fake_Dlls depends on
that."
-- fi
-- enable_ntdll_WRITECOPY=1
-- enable_ws2_32_WSACleanup=1
--fi
--
- if test "$enable_ntdll_Hide_Wine_Exports" -eq 1; then
- if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then
- abort "Patchset advapi32-Token_Integrity_Level disabled, but
ntdll-Hide_Wine_Exports depends on that."
-@@ -3977,98 +3966,6 @@ if test "$enable_ntdll_NtAccessCheck" -eq 1; then
- ) >> "$patchlist"
- fi
-
--# Patchset ws2_32-WSACleanup
--# |
--# | This patchset fixes the following Wine bugs:
--# | * [#18670] Properly close sockets when WSACleanup is called
--# |
--# | Modified files:
--# | * dlls/ntdll/ntdll.spec, dlls/ntdll/server.c, dlls/ntdll/unix/loader.c,
dlls/ntdll/unix/server.c,
--# | dlls/ntdll/unix/unix_private.h, dlls/ntdll/unixlib.h, dlls/ws2_32/socket.c,
dlls/ws2_32/tests/sock.c,
--# | include/wine/server.h, server/protocol.def, server/sock.c
--# |
--if test "$enable_ws2_32_WSACleanup" -eq 1; then
-- patch_apply
ws2_32-WSACleanup/0001-ws2_32-Proper-WSACleanup-implementation-using-winese.patch
-- patch_apply
ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
-- (
-- printf '%s\n' '+ { "Matt Durgavich", "ws2_32: Proper
WSACleanup implementation using wineserver function.", 2 },';
-- printf '%s\n' '+ { "Sebastian Lackner", "ws2_32:
Invalidate client-side file descriptor cache in WSACleanup.", 1 },';
-- ) >> "$patchlist"
--fi
--
--# Patchset winebuild-Fake_Dlls
--# |
--# | This patchset has the following (direct or indirect) dependencies:
--# | * ntdll-WRITECOPY, ws2_32-WSACleanup
--# |
--# | This patchset fixes the following Wine bugs:
--# | * [#21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare
Iron) crash on startup unless '--no-
--# | sandbox' is used (native API sandboxing/hooking scheme incompatible with Wine)
--# | * [#42741] StarCraft I: 1.18 PTR fails to initialize ClientSdk.dll
--# | * [#45349] Multiple applications and games crash due to missing support for 64-bit
syscall thunks (StreetFighter V)
--# | * [#45573] League of Legends 8.12+ fails to start a game (anticheat engine,
hooking of syscall return instructions)
--# | * [#45650] chromium 32-bit sandbox expects different syscall thunks depending on
Windows version
--# |
--# | Modified files:
--# | * dlls/dbghelp/cpu_i386.c, dlls/kernel32/tests/loader.c,
dlls/krnl386.exe16/kernel.c,
--# | dlls/krnl386.exe16/kernel16_private.h, dlls/krnl386.exe16/ne_module.c,
dlls/krnl386.exe16/ne_segment.c,
--# | dlls/krnl386.exe16/task.c, dlls/krnl386.exe16/thunk.c,
dlls/krnl386.exe16/wowthunk.c, dlls/ntdll/actctx.c,
--# | dlls/ntdll/directory.c, dlls/ntdll/loader.c, dlls/ntdll/locale.c,
dlls/ntdll/ntdll_misc.h, dlls/ntdll/path.c,
--# | dlls/ntdll/process.c, dlls/ntdll/signal_i386.c, dlls/ntdll/tests/exception.c,
dlls/ntdll/thread.c,
--# | dlls/ntdll/unix/thread.c, dlls/ntdll/unix/unix_private.h,
dlls/ntdll/unix/virtual.c, dlls/ntdll/unixlib.h,
--# | dlls/system.drv16/system.c, dlls/toolhelp.dll16/toolhelp.c,
dlls/user.exe16/message.c, dlls/user.exe16/user.c,
--# | dlls/user.exe16/window.c, include/winternl.h, libs/wine/loader.c, server/mapping.c,
tools/winebuild/build.h,
--# | tools/winebuild/import.c, tools/winebuild/parser.c, tools/winebuild/relay.c,
tools/winebuild/res32.c,
--# | tools/winebuild/spec16.c, tools/winebuild/spec32.c, tools/winebuild/utils.c
--# |
--if test "$enable_winebuild_Fake_Dlls" -eq 1; then
-- patch_apply
winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
-- patch_apply
winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
-- patch_apply
winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-- patch_apply
winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
-- patch_apply winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
-- patch_apply winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
-- patch_apply
winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
-- patch_apply
winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
-- patch_apply
winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
-- patch_apply
winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
-- patch_apply winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
-- (
-- printf '%s\n' '+ { "Michael Müller", "kernel32/tests:
Add basic tests for fake dlls.", 1 },';
-- printf '%s\n' '+ { "Sebastian Lackner", "krnl386.exe16:
Do not abuse WOW32Reserved field for 16-bit stack address.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "winebuild:
Generate syscall thunks for ntdll exports.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "winebuild: Use
multipass label system to generate fake dlls.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "winebuild: Add
stub functions in fake dlls.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "winebuild: Add
syscall thunks in fake dlls.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "winebuild: Fix
size of relocation information in fake dlls.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "winebuild: Try to
make sure RVA matches between fake and builtin DLLs.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "libs/wine: Use
same file alignment for fake and builtin DLLs.", 1 },';
-- printf '%s\n' '+ { "Michael Müller", "tools/winebuild:
Add syscall thunks for 64 bit.", 1 },';
-- printf '%s\n' '+ { "Paul Gofman", "ntdll: Call
NtOpenFile through syscall thunk.", 1 },';
-- ) >> "$patchlist"
--fi
--
--# Patchset ntdll-NtContinue
--# |
--# | This patchset has the following (direct or indirect) dependencies:
--# | * ntdll-WRITECOPY, ws2_32-WSACleanup, winebuild-Fake_Dlls
--# |
--# | This patchset fixes the following Wine bugs:
--# | * [#31910] Add stub for NtContinue
--# | * [#45572] League of Legends 8.12+ fails to start a game (anticheat engine,
hooking of NtContinue)
--# |
--# | Modified files:
--# | * dlls/ntdll/exception.c, dlls/ntdll/ntdll.spec, dlls/ntdll/signal_i386.c,
dlls/ntdll/signal_x86_64.c
--# |
--if test "$enable_ntdll_NtContinue" -eq 1; then
-- patch_apply ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
-- patch_apply
ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
-- (
-- printf '%s\n' '+ { "Michael Müller", "ntdll: Add stub
for NtContinue.", 1 },';
-- printf '%s\n' '+ { "Andrew Wesie", "ntdll: Use
NtContinue to continue execution after exceptions.", 1 },';
-- ) >> "$patchlist"
--fi
--
- # Patchset ntdll-Pipe_SpecialCharacters
- # |
- # | This patchset fixes the following Wine bugs:
-@@ -4213,6 +4110,77 @@ if test "$enable_ntdll_Status_Mapping" -eq 1; then
- ) >> "$patchlist"
- fi
-
-+# Patchset ws2_32-WSACleanup
-+# |
-+# | This patchset fixes the following Wine bugs:
-+# | * [#18670] Properly close sockets when WSACleanup is called
-+# |
-+# | Modified files:
-+# | * dlls/ntdll/ntdll.spec, dlls/ntdll/server.c, dlls/ntdll/unix/loader.c,
dlls/ntdll/unix/server.c,
-+# | dlls/ntdll/unix/unix_private.h, dlls/ntdll/unixlib.h, dlls/ws2_32/socket.c,
dlls/ws2_32/tests/sock.c,
-+# | include/wine/server.h, server/protocol.def, server/sock.c
-+# |
-+if test "$enable_ws2_32_WSACleanup" -eq 1; then
-+ patch_apply
ws2_32-WSACleanup/0001-ws2_32-Proper-WSACleanup-implementation-using-winese.patch
-+ patch_apply
ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
-+ (
-+ printf '%s\n' '+ { "Matt Durgavich", "ws2_32: Proper
WSACleanup implementation using wineserver function.", 2 },';
-+ printf '%s\n' '+ { "Sebastian Lackner", "ws2_32:
Invalidate client-side file descriptor cache in WSACleanup.", 1 },';
-+ ) >> "$patchlist"
-+fi
-+
-+# Patchset winebuild-Fake_Dlls
-+# |
-+# | This patchset has the following (direct or indirect) dependencies:
-+# | * ntdll-WRITECOPY, ws2_32-WSACleanup
-+# |
-+# | This patchset fixes the following Wine bugs:
-+# | * [#21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare
Iron) crash on startup unless '--no-
-+# | sandbox' is used (native API sandboxing/hooking scheme incompatible with Wine)
-+# | * [#42741] StarCraft I: 1.18 PTR fails to initialize ClientSdk.dll
-+# | * [#45349] Multiple applications and games crash due to missing support for 64-bit
syscall thunks (StreetFighter V)
-+# | * [#45573] League of Legends 8.12+ fails to start a game (anticheat engine,
hooking of syscall return instructions)
-+# | * [#45650] chromium 32-bit sandbox expects different syscall thunks depending on
Windows version
-+# |
-+# | Modified files:
-+# | * dlls/dbghelp/cpu_i386.c, dlls/kernel32/tests/loader.c,
dlls/krnl386.exe16/kernel.c,
-+# | dlls/krnl386.exe16/kernel16_private.h, dlls/krnl386.exe16/ne_module.c,
dlls/krnl386.exe16/ne_segment.c,
-+# | dlls/krnl386.exe16/task.c, dlls/krnl386.exe16/thunk.c,
dlls/krnl386.exe16/wowthunk.c, dlls/ntdll/actctx.c,
-+# | dlls/ntdll/directory.c, dlls/ntdll/loader.c, dlls/ntdll/locale.c,
dlls/ntdll/ntdll_misc.h, dlls/ntdll/path.c,
-+# | dlls/ntdll/process.c, dlls/ntdll/signal_i386.c, dlls/ntdll/tests/exception.c,
dlls/ntdll/thread.c,
-+# | dlls/ntdll/unix/thread.c, dlls/ntdll/unix/unix_private.h,
dlls/ntdll/unix/virtual.c, dlls/ntdll/unixlib.h,
-+# | dlls/system.drv16/system.c, dlls/toolhelp.dll16/toolhelp.c,
dlls/user.exe16/message.c, dlls/user.exe16/user.c,
-+# | dlls/user.exe16/window.c, include/winternl.h, libs/wine/loader.c, server/mapping.c,
tools/winebuild/build.h,
-+# | tools/winebuild/import.c, tools/winebuild/parser.c, tools/winebuild/relay.c,
tools/winebuild/res32.c,
-+# | tools/winebuild/spec16.c, tools/winebuild/spec32.c, tools/winebuild/utils.c
-+# |
-+if test "$enable_winebuild_Fake_Dlls" -eq 1; then
-+ patch_apply
winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
-+ patch_apply
winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
-+ patch_apply
winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-+ patch_apply
winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
-+ patch_apply winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
-+ patch_apply winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
-+ patch_apply
winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
-+ patch_apply
winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
-+ patch_apply
winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
-+ patch_apply
winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
-+ patch_apply winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
-+ (
-+ printf '%s\n' '+ { "Michael Müller", "kernel32/tests:
Add basic tests for fake dlls.", 1 },';
-+ printf '%s\n' '+ { "Sebastian Lackner", "krnl386.exe16:
Do not abuse WOW32Reserved field for 16-bit stack address.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "winebuild:
Generate syscall thunks for ntdll exports.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "winebuild: Use
multipass label system to generate fake dlls.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "winebuild: Add
stub functions in fake dlls.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "winebuild: Add
syscall thunks in fake dlls.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "winebuild: Fix
size of relocation information in fake dlls.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "winebuild: Try to
make sure RVA matches between fake and builtin DLLs.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "libs/wine: Use
same file alignment for fake and builtin DLLs.", 1 },';
-+ printf '%s\n' '+ { "Michael Müller", "tools/winebuild:
Add syscall thunks for 64 bit.", 1 },';
-+ printf '%s\n' '+ { "Paul Gofman", "ntdll: Call
NtOpenFile through syscall thunk.", 1 },';
-+ ) >> "$patchlist"
-+fi
-+
- # Patchset ntdll-Syscall_Emulation
- # |
- # | This patchset has the following (direct or indirect) dependencies:
-diff --git
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-index 751b497da..684c28e16 100644
----
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-+++
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-@@ -1,4 +1,4 @@
--From 1fec139d96f32869fc0c8d15219fff493d9951d8 Mon Sep 17 00:00:00 2001
-+From e60eb454ecfb4c043a585c1ecd2970c92be1c664 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)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 45d32399adf..b42cff8bcd4 100644
-+index ffbc9fabb23..a633099877d 100644
- --- a/dlls/ntdll/loader.c
- +++ b/dlls/ntdll/loader.c
- @@ -3810,6 +3810,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
-@@ -33,7 +33,7 @@ index 45d32399adf..b42cff8bcd4 100644
-
- /******************************************************************
- * LdrInitializeThunk (NTDLL.@)
--@@ -3827,6 +3828,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
-+@@ -3826,6 +3827,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
- WINE_MODREF *wm;
- LPCWSTR load_path =
NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
-
-@@ -43,19 +43,19 @@ index 45d32399adf..b42cff8bcd4 100644
-
- if (process_detaching) return;
- diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
--index be88d9bf3c7..84ab7991886 100644
-+index 3be6342a945..85329be4f42 100644
- --- a/dlls/ntdll/signal_i386.c
- +++ b/dlls/ntdll/signal_i386.c
--@@ -448,6 +448,8 @@ static ULONG first_ldt_entry = 32;
-+@@ -444,6 +444,8 @@ struct stack_layout
-
-- static wine_signal_handler handlers[256];
-+ 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) */
--@@ -1159,7 +1161,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD
edi, DWORD esi,
-+@@ -1127,7 +1129,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD
edi, DWORD esi,
- {
- context->Ebp = ebp;
- context->Esp = (DWORD)&retaddr;
-@@ -78,7 +78,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 79d13a01a86..94eb6d1252d 100644
-+index 49daa33ca58..17b5d40215a 100644
- --- a/dlls/ntdll/thread.c
- +++ b/dlls/ntdll/thread.c
- @@ -173,6 +173,7 @@ int __cdecl __wine_dbg_output( const char *str )
-@@ -99,10 +99,10 @@ index 79d13a01a86..94eb6d1252d 100644
- peb = teb->Peb;
- peb->FastPebLock = &peb_lock;
- diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
--index b6458da61ad..a158ec20a6a 100644
-+index d4b7a51a627..bdc87e4b9cf 100644
- --- a/dlls/ntdll/unix/thread.c
- +++ b/dlls/ntdll/unix/thread.c
--@@ -83,7 +83,7 @@ static void pthread_exit_wrapper( int status )
-+@@ -85,7 +85,7 @@ static void pthread_exit_wrapper( int status )
- * init_threading
- */
- TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T
*size, BOOL *suspend,
-@@ -111,7 +111,7 @@ index b6458da61ad..a158ec20a6a 100644
- {
- TEB *teb;
- SIZE_T info_size;
--@@ -95,6 +95,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZ
-+@@ -97,6 +97,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZ
- nb_threads = nb_threads_ptr;
-
- teb = virtual_alloc_first_teb();
-@@ -120,10 +120,10 @@ index b6458da61ad..a158ec20a6a 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 880e3aacf33..6c7b961e95a 100644
-+index 19104f0f5cc..bdf8bc99e3f 100644
- --- a/dlls/ntdll/unix/unix_private.h
- +++ b/dlls/ntdll/unix/unix_private.h
--@@ -96,7 +96,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd )
DECLSPEC_HIDDE
-+@@ -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;
- extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy,
SIZE_T *size,
- BOOL *suspend, unsigned int *cpus, BOOL *wow64,
-@@ -133,19 +133,19 @@ index 880e3aacf33..6c7b961e95a 100644
- extern void CDECL DECLSPEC_NORETURN abort_thread( int status ) DECLSPEC_HIDDEN;
- extern void CDECL DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN;
- diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
--index 83c9f3a163b..63728b1c071 100644
-+index 6a751993421..4e39ed53786 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 31
--+#define NTDLL_UNIXLIB_VERSION 32
-+-#define NTDLL_UNIXLIB_VERSION 33
-++#define NTDLL_UNIXLIB_VERSION 34
-
- struct unix_funcs
- {
--@@ -172,7 +172,7 @@ struct unix_funcs
-+@@ -174,7 +174,7 @@ struct unix_funcs
-
- /* thread/process functions */
- TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZE_T *size,
-diff --git
a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
-index 25c315648..0861f99c0 100644
----
a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
-+++
b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
-@@ -1,4 +1,4 @@
--From 1bb20ff5903d8d5e81e8a2b7b22bf67b189b16ec Mon Sep 17 00:00:00 2001
-+From 20661308a50202350a3a2887cbd558b1e931aad1 Mon Sep 17 00:00:00 2001
- From: Sebastian Lackner <sebastian(a)fds-team.de>
- Date: Sun, 6 Sep 2015 12:41:17 +0200
- Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache in
-@@ -17,7 +17,7 @@ Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache
in
- 9 files changed, 36 insertions(+), 5 deletions(-)
-
- diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
--index c4d78128758..3d6c8850086 100644
-+index ce5c580bd54..279845ae830 100644
- --- a/dlls/ntdll/ntdll.spec
- +++ b/dlls/ntdll/ntdll.spec
- @@ -1576,6 +1576,7 @@
-@@ -48,10 +48,10 @@ index 6fb86a68d6f..2f95e190963 100644
- /***********************************************************************
- * server_init_process
- diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
--index b5ee692024c..d8827b147df 100644
-+index 618e3d6adb3..bdda739897b 100644
- --- a/dlls/ntdll/unix/loader.c
- +++ b/dlls/ntdll/unix/loader.c
--@@ -1074,6 +1074,7 @@ static struct unix_funcs unix_funcs =
-+@@ -1076,6 +1076,7 @@ static struct unix_funcs unix_funcs =
- server_select,
- server_wait,
- server_send_fd,
-@@ -91,10 +91,10 @@ index fb3f98dd579..0754928cfe8 100644
- /***********************************************************************
- * server_get_unix_fd
- diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
--index a422fd825ed..880e3aacf33 100644
-+index 03b92f9e912..19104f0f5cc 100644
- --- a/dlls/ntdll/unix/unix_private.h
- +++ b/dlls/ntdll/unix/unix_private.h
--@@ -84,6 +84,7 @@ extern unsigned int CDECL server_select( const select_op_t *select_op,
data_size
-+@@ -89,6 +89,7 @@ extern unsigned int CDECL server_select( const select_op_t *select_op,
data_size
- extern unsigned int CDECL server_wait( const select_op_t *select_op, data_size_t size,
UINT flags,
- const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN;
- extern void CDECL server_send_fd( int fd ) DECLSPEC_HIDDEN;
-@@ -103,19 +103,19 @@ index a422fd825ed..880e3aacf33 100644
- int *needs_close, enum server_fd_type *type,
- unsigned int *options ) DECLSPEC_HIDDEN;
- diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
--index 58bdad19397..83c9f3a163b 100644
-+index 017a0a71b3f..6a751993421 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 30
--+#define NTDLL_UNIXLIB_VERSION 31
-+-#define NTDLL_UNIXLIB_VERSION 32
-++#define NTDLL_UNIXLIB_VERSION 33
-
- struct unix_funcs
- {
--@@ -187,6 +187,7 @@ struct unix_funcs
-+@@ -189,6 +189,7 @@ struct unix_funcs
- unsigned int (CDECL *server_wait)( const select_op_t *select_op, data_size_t size,
UINT flags,
- const LARGE_INTEGER *timeout );
- void (CDECL *server_send_fd)( int fd );
-diff --git a/staging/upstream-commit b/staging/upstream-commit
-index f51939b28..8b37e5310 100644
---- a/staging/upstream-commit
-+++ b/staging/upstream-commit
-@@ -1 +1 @@
--3cc3b445752902e07231900befc296f74ad6576e
-+17529582402ebe27ef975fc7dcb8353f4f95e629
diff --git a/wine-staging-5.10-ntdll-arm1.patch b/wine-staging-5.10-ntdll-arm1.patch
deleted file mode 100644
index 56a6f4f..0000000
--- a/wine-staging-5.10-ntdll-arm1.patch
+++ /dev/null
@@ -1,950 +0,0 @@
-From 5306e1df11e772fe8125fcd5857e52cf1f83430b Mon Sep 17 00:00:00 2001
-From: Paul Gofman <gofmanp(a)gmail.com>
-Date: Thu, 11 Jun 2020 15:23:12 +0300
-Subject: [PATCH] Updated winebuild-Fake_Dlls patchset.
-
-Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49357
----
- ...-tests-Add-basic-tests-for-fake-dlls.patch | 8 +--
- ...-not-abuse-WOW32Reserved-field-for-1.patch | 36 ++++++-------
- ...ate-syscall-thunks-for-ntdll-exports.patch | 53 +++++++++++--------
- ...ltipass-label-system-to-generate-fak.patch | 10 ++--
- ...uild-Add-stub-functions-in-fake-dlls.patch | 36 ++++++-------
- ...uild-Add-syscall-thunks-in-fake-dlls.patch | 8 +--
- ...ze-of-relocation-information-in-fake.patch | 4 +-
- ...-make-sure-RVA-matches-between-fake-.patch | 10 ++--
- ...me-file-alignment-for-fake-and-built.patch | 8 +--
- ...ebuild-Add-syscall-thunks-for-64-bit.patch | 39 ++++++--------
- ...all-NtOpenFile-through-syscall-thunk.patch | 32 +++++------
- 11 files changed, 123 insertions(+), 121 deletions(-)
-
-diff --git
a/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
b/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
-index ef056cfcf..21d69fd59 100644
----
a/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
-+++
b/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
-@@ -1,4 +1,4 @@
--From de68d5c0e6bd728788bbec09100ea59802b8ff13 Mon Sep 17 00:00:00 2001
-+From 8b88aa45856684e63786425f72886f2ac57b3630 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Thu, 25 May 2017 07:02:46 +0200
- Subject: [PATCH] kernel32/tests: Add basic tests for fake dlls.
-@@ -8,10 +8,10 @@ Subject: [PATCH] kernel32/tests: Add basic tests for fake dlls.
- 1 file changed, 91 insertions(+)
-
- diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
--index 5474d543248..4e7a15970cb 100644
-+index ef8c47c04f1a..efd5a25a432d 100644
- --- a/dlls/kernel32/tests/loader.c
- +++ b/dlls/kernel32/tests/loader.c
--@@ -1535,6 +1535,96 @@ static void test_filenames(void)
-+@@ -1572,6 +1572,96 @@ static void test_filenames(void)
- DeleteFileA( long_path );
- }
-
-@@ -108,7 +108,7 @@ index 5474d543248..4e7a15970cb 100644
- /* Verify linking style of import descriptors */
- static void test_ImportDescriptors(void)
- {
--@@ -3997,6 +4087,7 @@ START_TEST(loader)
-+@@ -4094,6 +4184,7 @@ START_TEST(loader)
- return;
- }
-
-diff --git
a/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
b/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
-index 15aaa85df..ae98c2798 100644
----
a/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
-+++
b/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
-@@ -1,4 +1,4 @@
--From 25d08438aba3dee16c79ce3168a4f76f39816fad Mon Sep 17 00:00:00 2001
-+From 7af81866f286e60f601d1c3f9bfe8592a794d21d Mon Sep 17 00:00:00 2001
- From: Sebastian Lackner <sebastian(a)fds-team.de>
- Date: Tue, 16 May 2017 04:37:52 +0200
- Subject: [PATCH] krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit
-@@ -24,7 +24,7 @@ Subject: [PATCH] krnl386.exe16: Do not abuse WOW32Reserved field for
16-bit
- 16 files changed, 78 insertions(+), 77 deletions(-)
-
- diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c
--index fd808a0d324..7d6723977a2 100644
-+index fd808a0d3248..7d6723977a29 100644
- --- a/dlls/dbghelp/cpu_i386.c
- +++ b/dlls/dbghelp/cpu_i386.c
- @@ -213,16 +213,16 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw,
STACKFRAME64 *frame,
-@@ -48,7 +48,7 @@ index fd808a0d324..7d6723977a2 100644
- }
- next_switch = p;
- diff --git a/dlls/krnl386.exe16/kernel.c b/dlls/krnl386.exe16/kernel.c
--index 07a57d0d937..89ea5c042e7 100644
-+index 07a57d0d9372..89ea5c042e71 100644
- --- a/dlls/krnl386.exe16/kernel.c
- +++ b/dlls/krnl386.exe16/kernel.c
- @@ -47,8 +47,8 @@ static void thread_attach(void)
-@@ -72,7 +72,7 @@ index 07a57d0d937..89ea5c042e7 100644
- }
-
- diff --git a/dlls/krnl386.exe16/kernel16_private.h
b/dlls/krnl386.exe16/kernel16_private.h
--index f15934daa0e..9f939a9d5ba 100644
-+index f15934daa0e4..9f939a9d5bac 100644
- --- a/dlls/krnl386.exe16/kernel16_private.h
- +++ b/dlls/krnl386.exe16/kernel16_private.h
- @@ -169,7 +169,7 @@ extern THHOOK *pThhook DECLSPEC_HIDDEN;
-@@ -119,7 +119,7 @@ index f15934daa0e..9f939a9d5ba 100644
-
- static inline struct kernel_thread_data *kernel_get_thread_data(void)
- diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c
--index f1e1a14dd67..c951a18f869 100644
-+index f1e1a14dd679..c951a18f8699 100644
- --- a/dlls/krnl386.exe16/ne_module.c
- +++ b/dlls/krnl386.exe16/ne_module.c
- @@ -1208,7 +1208,7 @@ DWORD NE_StartTask(void)
-@@ -143,7 +143,7 @@ index f1e1a14dd67..c951a18f869 100644
- WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)&context );
- ExitThread( LOWORD(context.Eax) );
- diff --git a/dlls/krnl386.exe16/ne_segment.c b/dlls/krnl386.exe16/ne_segment.c
--index aa886148029..70eb3360914 100644
-+index aa8861480298..70eb33609144 100644
- --- a/dlls/krnl386.exe16/ne_segment.c
- +++ b/dlls/krnl386.exe16/ne_segment.c
- @@ -370,9 +370,9 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
-@@ -209,7 +209,7 @@ index aa886148029..70eb3360914 100644
- args[7] = HIWORD(dwReason);
- args[6] = LOWORD(dwReason);
- diff --git a/dlls/krnl386.exe16/task.c b/dlls/krnl386.exe16/task.c
--index 39a60cb97a9..21de62c5a01 100644
-+index 39a60cb97a94..21de62c5a015 100644
- --- a/dlls/krnl386.exe16/task.c
- +++ b/dlls/krnl386.exe16/task.c
- @@ -624,7 +624,7 @@ void WINAPI InitTask16( CONTEXT *context )
-@@ -267,7 +267,7 @@ 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 e913a08f88c..ecc94371488 100644
-+index e913a08f88cc..ecc94371488f 100644
- --- a/dlls/krnl386.exe16/thunk.c
- +++ b/dlls/krnl386.exe16/thunk.c
- @@ -429,7 +429,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context )
-@@ -413,7 +413,7 @@ index e913a08f88c..ecc94371488 100644
- if (OFFSETOF(frame32->frame16) > lpbuf[2])
- {
- diff --git a/dlls/krnl386.exe16/wowthunk.c b/dlls/krnl386.exe16/wowthunk.c
--index 2dddbf93289..3a4b104a673 100644
-+index 2dddbf932898..3a4b104a673f 100644
- --- a/dlls/krnl386.exe16/wowthunk.c
- +++ b/dlls/krnl386.exe16/wowthunk.c
- @@ -127,7 +127,7 @@ static DWORD call16_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RE
-@@ -473,7 +473,7 @@ index 2dddbf93289..3a4b104a673 100644
- }
- }
- diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
--index 2928f314358..138f56b94eb 100644
-+index ac34f86a5883..55f1e2ce4b23 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 )
-@@ -486,7 +486,7 @@ index 2928f314358..138f56b94eb 100644
- return (void *)(ESP_sig(sigcontext) & ~3);
- }
- diff --git a/dlls/system.drv16/system.c b/dlls/system.drv16/system.c
--index b6fd51c05f0..695ad7b6003 100644
-+index b6fd51c05f01..695ad7b60039 100644
- --- a/dlls/system.drv16/system.c
- +++ b/dlls/system.drv16/system.c
- @@ -70,7 +70,7 @@ static void CALLBACK SYSTEM_TimerTick( LPVOID arg, DWORD low, DWORD
high )
-@@ -499,7 +499,7 @@ index b6fd51c05f0..695ad7b6003 100644
-
- WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)&context );
- diff --git a/dlls/toolhelp.dll16/toolhelp.c b/dlls/toolhelp.dll16/toolhelp.c
--index 578d1ae7fab..1077f0b0367 100644
-+index 578d1ae7faba..1077f0b03672 100644
- --- a/dlls/toolhelp.dll16/toolhelp.c
- +++ b/dlls/toolhelp.dll16/toolhelp.c
- @@ -491,8 +491,8 @@ BOOL16 WINAPI TaskNext16( TASKENTRY *lpte )
-@@ -523,7 +523,7 @@ index 578d1ae7fab..1077f0b0367 100644
- WORD user = LoadLibrary16( "USER.EXE" );
- WORD gdi = LoadLibrary16( "GDI.EXE" );
- diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c
--index e3ca3fd779d..fa9388ceaa1 100644
-+index e3ca3fd779d3..fa9388ceaa11 100644
- --- a/dlls/user.exe16/message.c
- +++ b/dlls/user.exe16/message.c
- @@ -240,11 +240,11 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg,
WPARAM16 wParam, LPA
-@@ -595,7 +595,7 @@ index e3ca3fd779d..fa9388ceaa1 100644
-
- stack16->ds = GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
- diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c
--index 27b92793836..deec596f766 100644
-+index 27b92793836a..deec596f7660 100644
- --- a/dlls/user.exe16/user.c
- +++ b/dlls/user.exe16/user.c
- @@ -1394,7 +1394,7 @@ DWORD WINAPI GetTabbedTextExtent16( HDC16 hdc, LPCSTR lpstr, INT16
count,
-@@ -617,7 +617,7 @@ index 27b92793836..deec596f766 100644
- int userPercent, gdiPercent;
-
- diff --git a/dlls/user.exe16/window.c b/dlls/user.exe16/window.c
--index bf86719325b..1f53bdc9540 100644
-+index bf86719325b8..1f53bdc95402 100644
- --- a/dlls/user.exe16/window.c
- +++ b/dlls/user.exe16/window.c
- @@ -456,7 +456,7 @@ HWND16 WINAPI GetParent16( HWND16 hwnd )
-@@ -630,10 +630,10 @@ 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 acbce20c212..68c1ae3fd82 100644
-+index 87eb0d32926b..2d9f54b89d8c 100644
- --- a/include/winternl.h
- +++ b/include/winternl.h
--@@ -362,7 +362,7 @@ typedef struct _TEB
-+@@ -363,7 +363,7 @@ typedef struct _TEB
- PVOID WOW32Reserved; /* 0c0/0100 */
- ULONG CurrentLocale; /* 0c4/0108 */
- ULONG FpSoftwareStatusRegister; /* 0c8/010c */
-@@ -643,7 +643,7 @@ index acbce20c212..68c1ae3fd82 100644
- ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8/02c8 */
- BYTE SpareBytes1[24]; /* 1bc/02e8 */
- diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c
--index 29d0a74c833..01bb97e02b4 100644
-+index 29d0a74c833c..01bb97e02b4c 100644
- --- a/tools/winebuild/relay.c
- +++ b/tools/winebuild/relay.c
- @@ -31,7 +31,7 @@
-diff --git
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-index 547e27f8f..a0487f91b 100644
----
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-+++
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
-@@ -1,4 +1,4 @@
--From 0c4d2573b123f2198f74292133b7a6eefa472620 Mon Sep 17 00:00:00 2001
-+From d8ff827f7a94aee2bed89c620120af0a148ca81c Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Thu, 11 May 2017 05:32:55 +0200
- Subject: [PATCH] winebuild: Generate syscall thunks for ntdll exports.
-@@ -8,7 +8,7 @@ Based on a patch by Erich E. Hoover.
- dlls/ntdll/loader.c | 3 +
- dlls/ntdll/signal_i386.c | 4 +-
- dlls/ntdll/tests/exception.c | 2 +
-- dlls/ntdll/thread.c | 3 +-
-+ dlls/ntdll/thread.c | 10 +++-
- dlls/ntdll/unix/thread.c | 3 +-
- dlls/ntdll/unix/unix_private.h | 2 +-
- dlls/ntdll/unixlib.h | 4 +-
-@@ -19,13 +19,13 @@ Based on a patch by Erich E. Hoover.
- tools/winebuild/spec16.c | 22 +------
- tools/winebuild/spec32.c | 104 +++++++++++++++++++++++++++++++++
- tools/winebuild/utils.c | 21 +++++++
-- 14 files changed, 214 insertions(+), 32 deletions(-)
-+ 14 files changed, 221 insertions(+), 32 deletions(-)
-
- diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
--index 0c8f05285c4..26c540050dc 100644
-+index 2553b0b9d397..cac6aae2f3dd 100644
- --- a/dlls/ntdll/loader.c
- +++ b/dlls/ntdll/loader.c
--@@ -3810,6 +3810,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
-+@@ -4021,6 +4021,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
- return ret;
- }
-
-@@ -33,7 +33,7 @@ index 0c8f05285c4..26c540050dc 100644
-
- /******************************************************************
- * LdrInitializeThunk (NTDLL.@)
--@@ -3826,6 +3827,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
-+@@ -4038,6 +4039,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
- WINE_MODREF *wm;
- LPCWSTR load_path =
NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
-
-@@ -43,7 +43,7 @@ index 0c8f05285c4..26c540050dc 100644
-
- RtlEnterCriticalSection( &loader_section );
- diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
--index 21cc1b3ead4..18be5693a7d 100644
-+index 21cc1b3ead40..18be5693a7d2 100644
- --- a/dlls/ntdll/signal_i386.c
- +++ b/dlls/ntdll/signal_i386.c
- @@ -346,6 +346,8 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 4,
-@@ -65,7 +65,7 @@ index 21cc1b3ead4..18be5693a7d 100644
- }
- return unix_funcs->NtGetContextThread( handle, context );
- diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
--index a5e6faa461a..51938bf84cc 100644
-+index 1389a542cdee..54796476e25b 100644
- --- a/dlls/ntdll/tests/exception.c
- +++ b/dlls/ntdll/tests/exception.c
- @@ -1643,6 +1643,8 @@ static void test_thread_context(void)
-@@ -78,18 +78,25 @@ 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 5a6809638ae..fa10cdf1062 100644
-+index ff5fe9d6226a..e93498b27ea0 100644
- --- a/dlls/ntdll/thread.c
- +++ b/dlls/ntdll/thread.c
--@@ -170,6 +170,7 @@ int __cdecl __wine_dbg_output( const char *str )
-+@@ -220,6 +220,14 @@ int __cdecl __wine_dbg_output( const char *str )
- return unix_funcs->dbg_output( str );
- }
-
-++#if defined(__i386__) || defined(__x86_64__)
- +extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
-++#else
-++void __wine_syscall_dispatcher( void )
-++{
-++ FIXME("Syscall dispatcher is not available for this architecture.\n");
-++}
-++#endif
-
- /***********************************************************************
- * thread_init
--@@ -181,7 +182,7 @@ int __cdecl __wine_dbg_output( const char *str )
-+@@ -231,7 +239,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,
-@@ -99,7 +106,7 @@ index 5a6809638ae..fa10cdf1062 100644
- peb = teb->Peb;
- peb->FastPebLock = &peb_lock;
- diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
--index 97b191e1a5b..2dbaa43e731 100644
-+index 97b191e1a5b3..2dbaa43e731a 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,10 +127,10 @@ index 97b191e1a5b..2dbaa43e731 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 19dd216fc35..a1c48a52606 100644
-+index 92a58417827b..33a551e947c2 100644
- --- a/dlls/ntdll/unix/unix_private.h
- +++ b/dlls/ntdll/unix/unix_private.h
--@@ -107,7 +107,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd )
DECLSPEC_HIDDE
-+@@ -108,7 +108,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,
-@@ -133,7 +140,7 @@ index 19dd216fc35..a1c48a52606 100644
- 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 4c580c49d13..4f0080db03d 100644
-+index 4c580c49d139..4f0080db03d9 100644
- --- a/dlls/ntdll/unixlib.h
- +++ b/dlls/ntdll/unixlib.h
- @@ -28,7 +28,7 @@ struct ldt_copy;
-@@ -155,10 +162,10 @@ index 4c580c49d13..4f0080db03d 100644
- 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 68c1ae3fd82..f2da9157aab 100644
-+index 2d9f54b89d8c..0c15a0ee6c34 100644
- --- a/include/winternl.h
- +++ b/include/winternl.h
--@@ -359,7 +359,7 @@ typedef struct _TEB
-+@@ -360,7 +360,7 @@ typedef struct _TEB
- PVOID CsrClientThread; /* 03c/0070 */
- PVOID Win32ThreadInfo; /* 040/0078 */
- ULONG Win32ClientInfo[31]; /* 044/0080 used
for user32 private data in Wine */
-@@ -168,7 +175,7 @@ index 68c1ae3fd82..f2da9157aab 100644
- ULONG FpSoftwareStatusRegister; /* 0c8/010c */
- PVOID SystemReserved1[54]; /* 0cc/0110 used
for krnl386.exe16 private data in Wine */
- diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
--index c162888a035..55d5b0b9dc2 100644
-+index c162888a0356..55d5b0b9dc28 100644
- --- a/tools/winebuild/build.h
- +++ b/tools/winebuild/build.h
- @@ -105,6 +105,7 @@ typedef struct
-@@ -216,7 +223,7 @@ index c162888a035..55d5b0b9dc2 100644
-
- extern int byte_swapped;
- diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
--index 04ab433dd65..0c6bafed8e5 100644
-+index 04ab433dd65a..0c6bafed8e54 100644
- --- a/tools/winebuild/import.c
- +++ b/tools/winebuild/import.c
- @@ -531,6 +531,7 @@ static void check_undefined_forwards( DLLSPEC *spec )
-@@ -256,7 +263,7 @@ index 04ab433dd65..0c6bafed8e5 100644
- }
- }
- diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
--index 0f2b9c1e10a..74216f8bb6e 100644
-+index 0f2b9c1e10ad..74216f8bb6e7 100644
- --- a/tools/winebuild/parser.c
- +++ b/tools/winebuild/parser.c
- @@ -543,6 +543,24 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
-@@ -347,7 +354,7 @@ index 0f2b9c1e10a..74216f8bb6e 100644
- }
-
- diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c
--index a52c03aaa6a..15ef9a3f893 100644
-+index a52c03aaa6a7..15ef9a3f8930 100644
- --- a/tools/winebuild/spec16.c
- +++ b/tools/winebuild/spec16.c
- @@ -495,27 +495,6 @@ static int relay_type_compare( const void *e1, const void *e2 )
-@@ -387,7 +394,7 @@ index a52c03aaa6a..15ef9a3f893 100644
- entry_point->u.func.nb_args = 0;
- assert( !spec->ordinals[0] );
- diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
--index b1e20e0484d..22dd399cb2b 100644
-+index b1e20e0484dc..22dd399cb2b4 100644
- --- a/tools/winebuild/spec32.c
- +++ b/tools/winebuild/spec32.c
- @@ -374,6 +374,109 @@ static void output_relay_debug( DLLSPEC *spec )
-@@ -509,7 +516,7 @@ index b1e20e0484d..22dd399cb2b 100644
- output_exports( spec );
- output_imports( spec );
- diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
--index 2a1fc960926..07a579004ad 100644
-+index 2a1fc960926b..07a579004adc 100644
- --- a/tools/winebuild/utils.c
- +++ b/tools/winebuild/utils.c
- @@ -860,6 +860,7 @@ void free_dll_spec( DLLSPEC *spec )
-diff --git
a/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
b/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
-index 6c3984f8b..d4813799e 100644
----
a/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
-+++
b/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
-@@ -1,4 +1,4 @@
--From 15182deeb13e26abdb3067a77353354726ac82aa Mon Sep 17 00:00:00 2001
-+From 344eb39bdfee74d4d826fa2f61a95736f0ee9823 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Mon, 15 May 2017 02:05:49 +0200
- Subject: [PATCH] winebuild: Use multipass label system to generate fake dlls.
-@@ -11,7 +11,7 @@ Subject: [PATCH] winebuild: Use multipass label system to generate fake
dlls.
- 4 files changed, 181 insertions(+), 63 deletions(-)
-
- diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
--index 6ee847f908c..210324406a9 100644
-+index 55d5b0b9dc28..8930df408d3b 100644
- --- a/tools/winebuild/build.h
- +++ b/tools/winebuild/build.h
- @@ -343,6 +343,7 @@ extern size_t input_buffer_pos;
-@@ -35,7 +35,7 @@ index 6ee847f908c..210324406a9 100644
- /* global variables */
-
- diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
--index bd55bb2fa5c..d9329019f8a 100644
-+index bd55bb2fa5c4..d9329019f8a3 100644
- --- a/tools/winebuild/res32.c
- +++ b/tools/winebuild/res32.c
- @@ -539,7 +539,6 @@ void output_bin_resources( DLLSPEC *spec, unsigned int start_rva )
-@@ -47,7 +47,7 @@ index bd55bb2fa5c..d9329019f8a 100644
- /* output the resource directories */
-
- diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
--index 22dd399cb2b..c38f1fe663c 100644
-+index 22dd399cb2b4..c38f1fe663c7 100644
- --- a/tools/winebuild/spec32.c
- +++ b/tools/winebuild/spec32.c
- @@ -844,11 +844,11 @@ void output_spec32_file( DLLSPEC *spec )
-@@ -279,7 +279,7 @@ index 22dd399cb2b..c38f1fe663c 100644
- }
-
- diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
--index 7dc61a708db..64e1fa51455 100644
-+index 07a579004adc..80dec6db29ea 100644
- --- a/tools/winebuild/utils.c
- +++ b/tools/winebuild/utils.c
- @@ -34,6 +34,7 @@
-diff --git
a/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
b/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
-index f96d51aee..4ac05a314 100644
---- a/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
-+++ b/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
-@@ -1,4 +1,4 @@
--From 167ad04157dd746ee9395afa9505fe00cc866f9b Mon Sep 17 00:00:00 2001
-+From e5fc6ee60be5dd3b80af96dcbd81adb742ba7a5d Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Mon, 15 May 2017 16:27:56 +0200
- Subject: [PATCH] winebuild: Add stub functions in fake dlls.
-@@ -14,10 +14,10 @@ Subject: [PATCH] winebuild: Add stub functions in fake dlls.
- 7 files changed, 251 insertions(+), 15 deletions(-)
-
- diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
--index 926fa913866..902907329c0 100644
-+index efd5a25a432d..182b61b731a2 100644
- --- a/dlls/kernel32/tests/loader.c
- +++ b/dlls/kernel32/tests/loader.c
--@@ -1596,9 +1596,7 @@ static void test_FakeDLL(void)
-+@@ -1597,9 +1597,7 @@ static void test_FakeDLL(void)
- ok(ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError());
-
- dir = RtlImageDirectoryEntryToData(ptr, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT,
&size);
-@@ -27,7 +27,7 @@ index 926fa913866..902907329c0 100644
-
- names = RVAToAddr(dir->AddressOfNames, ptr);
- ordinals = RVAToAddr(dir->AddressOfNameOrdinals, ptr);
--@@ -1627,17 +1625,20 @@ todo_wine
-+@@ -1628,17 +1626,20 @@ todo_wine
- /* check position in memory */
- dll_rva = (DWORD_PTR)dll_func - (DWORD_PTR)module;
- map_rva = funcs[ordinals[i]];
-@@ -48,7 +48,7 @@ index 926fa913866..902907329c0 100644
- ok(!memcmp(map_func, dll_func, 0x20), "%s: Function content does not
match!\n", func_name);
-
- if (!strcmp(func_name, "NtSetEvent"))
--@@ -1651,10 +1652,11 @@ todo_wine
-+@@ -1652,10 +1653,11 @@ todo_wine
- ok(event != NULL, "CreateEvent failed with error %u\n",
GetLastError());
- pNtSetEvent(event, 0);
- ok(WaitForSingleObject(event, 0) == WAIT_OBJECT_0, "Event was not
signaled\n");
-@@ -62,10 +62,10 @@ index 926fa913866..902907329c0 100644
- CloseHandle(map);
- CloseHandle(file);
- diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
--index 26c540050dc..09d3870c31a 100644
-+index cac6aae2f3dd..51d989f30b45 100644
- --- a/dlls/ntdll/loader.c
- +++ b/dlls/ntdll/loader.c
--@@ -3811,6 +3811,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
-+@@ -4022,6 +4022,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
- }
-
- extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
-@@ -73,7 +73,7 @@ index 26c540050dc..09d3870c31a 100644
-
- /******************************************************************
- * LdrInitializeThunk (NTDLL.@)
--@@ -3828,6 +3829,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
-+@@ -4040,6 +4041,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
- LPCWSTR load_path =
NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
-
- NtCurrentTeb()->WOW32Reserved = __wine_syscall_dispatcher;
-@@ -82,12 +82,12 @@ index 26c540050dc..09d3870c31a 100644
- if (process_detaching) return;
-
- diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
--index fa10cdf1062..4840f527e59 100644
-+index e93498b27ea0..a14e3a12ae0c 100644
- --- a/dlls/ntdll/thread.c
- +++ b/dlls/ntdll/thread.c
--@@ -172,6 +172,39 @@ int __cdecl __wine_dbg_output( const char *str )
--
-- extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
-+@@ -229,6 +229,39 @@ void __wine_syscall_dispatcher( void )
-+ }
-+ #endif
-
- +void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
- +{
-@@ -125,7 +125,7 @@ index fa10cdf1062..4840f527e59 100644
- /***********************************************************************
- * thread_init
- *
--@@ -183,6 +216,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
-+@@ -240,6 +273,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 );
-@@ -134,10 +134,10 @@ index fa10cdf1062..4840f527e59 100644
- peb = teb->Peb;
- peb->FastPebLock = &peb_lock;
- diff --git a/include/winternl.h b/include/winternl.h
--index f2da9157aab..ce8021af503 100644
-+index 0c15a0ee6c34..6da672e979e5 100644
- --- a/include/winternl.h
- +++ b/include/winternl.h
--@@ -398,7 +398,7 @@ typedef struct _TEB
-+@@ -399,7 +399,7 @@ typedef struct _TEB
- PVOID Instrumentation[16]; /* f2c/16b8 */
- PVOID WinSockData; /* f6c/1738 */
- ULONG GdiBatchCount; /* f70/1740 */
-@@ -147,7 +147,7 @@ index f2da9157aab..ce8021af503 100644
- PVOID ReservedForPerf; /* f7c/1750 */
- PVOID ReservedForOle; /* f80/1758 */
- diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
--index 8930df408d3..44113bad28a 100644
-+index 8930df408d3b..44113bad28af 100644
- --- a/tools/winebuild/build.h
- +++ b/tools/winebuild/build.h
- @@ -358,6 +358,7 @@ extern void put_word( unsigned short val );
-@@ -159,7 +159,7 @@ index 8930df408d3..44113bad28a 100644
- extern void align_output_rva( unsigned int file_align, unsigned int rva_align );
- extern size_t label_pos( const char *name );
- diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
--index c38f1fe663c..bf82ca497c0 100644
-+index c38f1fe663c7..bf82ca497c0d 100644
- --- a/tools/winebuild/spec32.c
- +++ b/tools/winebuild/spec32.c
- @@ -843,6 +843,163 @@ void output_spec32_file( DLLSPEC *spec )
-@@ -415,7 +415,7 @@ index c38f1fe663c..bf82ca497c0 100644
- /* .reloc contents */
- align_output_rva( file_align, section_align );
- diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
--index 80dec6db29e..d394a1382c6 100644
-+index 80dec6db29ea..d394a1382c68 100644
- --- a/tools/winebuild/utils.c
- +++ b/tools/winebuild/utils.c
- @@ -549,7 +549,7 @@ size_t output_buffer_size;
-diff --git
a/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
b/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
-index 5ae2b3deb..13f46d6b0 100644
---- a/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
-+++ b/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
-@@ -1,4 +1,4 @@
--From 84a9f7b8192d7735108da2d7e81cf63faef97c13 Mon Sep 17 00:00:00 2001
-+From fd72d405abba827ab5e2603551d48200aedad3ce Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Mon, 15 May 2017 17:56:48 +0200
- Subject: [PATCH] winebuild: Add syscall thunks in fake dlls.
-@@ -9,10 +9,10 @@ Subject: [PATCH] winebuild: Add syscall thunks in fake dlls.
- 2 files changed, 25 insertions(+), 3 deletions(-)
-
- diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
--index ec173c94a8e..a3bed8b310b 100644
-+index 182b61b731a2..98369c7d508c 100644
- --- a/dlls/kernel32/tests/loader.c
- +++ b/dlls/kernel32/tests/loader.c
--@@ -1602,7 +1602,6 @@ static void test_FakeDLL(void)
-+@@ -1639,7 +1639,6 @@ static void test_FakeDLL(void)
-
- /* check function content */
- map_func = RVAToAddr(map_rva, ptr);
-@@ -21,7 +21,7 @@ index ec173c94a8e..a3bed8b310b 100644
-
- if (!strcmp(func_name, "NtSetEvent"))
- diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
--index bf82ca497c0..6968e41260f 100644
-+index bf82ca497c0d..6968e41260f1 100644
- --- a/tools/winebuild/spec32.c
- +++ b/tools/winebuild/spec32.c
- @@ -860,13 +860,36 @@ static void create_stub_exports_text( DLLSPEC *spec )
-diff --git
a/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
b/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
-index 92a7161de..3b3745ed6 100644
----
a/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
-+++
b/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
-@@ -1,4 +1,4 @@
--From d77c31b1567bfbde1ce4ceb526ad596d0be3e788 Mon Sep 17 00:00:00 2001
-+From f92fc0572be02ce2eee2a9cbf60724372678a5af Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Thu, 25 May 2017 03:22:25 +0200
- Subject: [PATCH] winebuild: Fix size of relocation information in fake dlls.
-@@ -8,7 +8,7 @@ Subject: [PATCH] winebuild: Fix size of relocation information in fake
dlls.
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
- diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
--index 6968e41260f..f95b45b9a0d 100644
-+index 6968e41260f1..f95b45b9a0d5 100644
- --- a/tools/winebuild/spec32.c
- +++ b/tools/winebuild/spec32.c
- @@ -1238,8 +1238,8 @@ static void output_fake_module_pass( DLLSPEC *spec )
-diff --git
a/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
b/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
-index c4f1fb004..2cb4b7cf1 100644
----
a/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
-+++
b/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
-@@ -1,4 +1,4 @@
--From afa59bbabca36f306e9db4c1b080a250c4a919ea Mon Sep 17 00:00:00 2001
-+From 59efee63a7442dfee4d9e76b11f651a11a4b523e Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Thu, 25 May 2017 21:46:27 +0200
- Subject: [PATCH] winebuild: Try to make sure RVA matches between fake and
-@@ -11,10 +11,10 @@ Subject: [PATCH] winebuild: Try to make sure RVA matches between fake
and
- 3 files changed, 26 insertions(+), 5 deletions(-)
-
- diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
--index a3bed8b310b..8b5a345b086 100644
-+index 98369c7d508c..77e73b3ca37b 100644
- --- a/dlls/kernel32/tests/loader.c
- +++ b/dlls/kernel32/tests/loader.c
--@@ -1589,7 +1589,6 @@ static void test_FakeDLL(void)
-+@@ -1626,7 +1626,6 @@ static void test_FakeDLL(void)
- /* check position in memory */
- dll_rva = (DWORD_PTR)dll_func - (DWORD_PTR)module;
- map_rva = funcs[ordinals[i]];
-@@ -23,7 +23,7 @@ index a3bed8b310b..8b5a345b086 100644
- func_name, dll_rva, map_rva);
-
- diff --git a/libs/wine/loader.c b/libs/wine/loader.c
--index c3b59d90224..b6847ca77b3 100644
-+index c3b59d902243..b6847ca77b31 100644
- --- a/libs/wine/loader.c
- +++ b/libs/wine/loader.c
- @@ -335,8 +335,12 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
-@@ -54,7 +54,7 @@ index c3b59d90224..b6847ca77b3 100644
-
- memcpy( sec->Name, ".text", sizeof(".text") );
- diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
--index f95b45b9a0d..07d6eed05fc 100644
-+index f95b45b9a0d5..07d6eed05fcc 100644
- --- a/tools/winebuild/spec32.c
- +++ b/tools/winebuild/spec32.c
- @@ -381,14 +381,25 @@ static void output_relay_debug( DLLSPEC *spec )
-diff --git
a/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
b/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
-index e0ae33a59..9113beb5f 100644
----
a/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
-+++
b/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
-@@ -1,4 +1,4 @@
--From 29478273c4db90d209ac5afbdc1dd80add3d2c7e Mon Sep 17 00:00:00 2001
-+From 370eccb19c65a8b02abfa31a76651ae533dda22f Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Thu, 25 May 2017 21:56:06 +0200
- Subject: [PATCH] libs/wine: Use same file alignment for fake and builtin DLLs.
-@@ -9,10 +9,10 @@ Subject: [PATCH] libs/wine: Use same file alignment for fake and
builtin DLLs.
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
- diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
--index 8b5a345b086..5373dc4efe1 100644
-+index 77e73b3ca37b..1f525194ce73 100644
- --- a/dlls/kernel32/tests/loader.c
- +++ b/dlls/kernel32/tests/loader.c
--@@ -1595,7 +1595,6 @@ static void test_FakeDLL(void)
-+@@ -1632,7 +1632,6 @@ static void test_FakeDLL(void)
- /* check position in file */
- map_offset = (DWORD_PTR)RtlImageRvaToVa(RtlImageNtHeader(ptr), ptr,
map_rva, NULL) - (DWORD_PTR)ptr;
- dll_offset = (DWORD_PTR)RtlImageRvaToVa(RtlImageNtHeader(module), module,
dll_rva, NULL) - (DWORD_PTR)module;
-@@ -21,7 +21,7 @@ index 8b5a345b086..5373dc4efe1 100644
- func_name, map_offset, dll_offset);
-
- diff --git a/libs/wine/loader.c b/libs/wine/loader.c
--index b6847ca77b3..4597a6cb324 100644
-+index b6847ca77b31..4597a6cb3243 100644
- --- a/libs/wine/loader.c
- +++ b/libs/wine/loader.c
- @@ -398,7 +398,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
-diff --git
a/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
b/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
-index 6024e5a2f..e40a80148 100644
----
a/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
-+++
b/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
-@@ -1,4 +1,4 @@
--From a5b4feebd008daab008f72567fe0001da619030e Mon Sep 17 00:00:00 2001
-+From 6f1973aa2aee35139ae041e59d37a45ff22dc5bf Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
- Date: Thu, 7 Sep 2017 00:38:09 +0200
- Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
-@@ -7,18 +7,18 @@ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
- dlls/kernel32/tests/loader.c | 7 +-
- dlls/ntdll/unix/thread.c | 2 +-
- dlls/ntdll/unix/unix_private.h | 2 +-
-- dlls/ntdll/unix/virtual.c | 12 +-
-+ dlls/ntdll/unix/virtual.c | 11 +-
- libs/wine/loader.c | 4 +
- server/mapping.c | 6 +-
- tools/winebuild/parser.c | 2 +-
- tools/winebuild/spec32.c | 285 ++++++++++++++++++++++++++++++++-
-- 8 files changed, 306 insertions(+), 14 deletions(-)
-+ 8 files changed, 305 insertions(+), 14 deletions(-)
-
- diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
--index 95939ba6bde..ae5462f6e55 100644
-+index 1f525194ce73..21af7b4ce7a4 100644
- --- a/dlls/kernel32/tests/loader.c
- +++ b/dlls/kernel32/tests/loader.c
--@@ -1573,7 +1573,7 @@ static void test_filenames(void)
-+@@ -1574,7 +1574,7 @@ static void test_filenames(void)
-
- static void test_FakeDLL(void)
- {
-@@ -27,7 +27,7 @@ index 95939ba6bde..ae5462f6e55 100644
- NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL;
- IMAGE_EXPORT_DIRECTORY *dir;
- HMODULE module = GetModuleHandleA("ntdll.dll");
--@@ -1615,8 +1615,13 @@ static void test_FakeDLL(void)
-+@@ -1616,8 +1616,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,7 +42,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/unix/thread.c b/dlls/ntdll/unix/thread.c
--index 2dbaa43e731..e1da90222d3 100644
-+index 2dbaa43e731a..e1da90222d38 100644
- --- a/dlls/ntdll/unix/thread.c
- +++ b/dlls/ntdll/unix/thread.c
- @@ -110,7 +110,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZ
-@@ -55,10 +55,10 @@ index 2dbaa43e731..e1da90222d3 100644
-
- if (size) *size = info_size;
- diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
--index a1c48a52606..9c9e5b80b0c 100644
-+index 33a551e947c2..d06f366d3c6d 100644
- --- a/dlls/ntdll/unix/unix_private.h
- +++ b/dlls/ntdll/unix/unix_private.h
--@@ -152,7 +152,7 @@ extern void virtual_init(void) DECLSPEC_HIDDEN;
-+@@ -153,7 +153,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;
-@@ -68,10 +68,10 @@ index a1c48a52606..9c9e5b80b0c 100644
- 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 660323d4dcc..a5e5cb8422d 100644
-+index 9fb2ecd38ca3..ad11485d1cea 100644
- --- a/dlls/ntdll/unix/virtual.c
- +++ b/dlls/ntdll/unix/virtual.c
--@@ -2588,14 +2588,14 @@ TEB *virtual_alloc_first_teb(void)
-+@@ -2772,14 +2772,14 @@ TEB *virtual_alloc_first_teb(void)
- TEB *teb;
- PEB *peb;
- NTSTATUS status;
-@@ -88,12 +88,7 @@ index 660323d4dcc..a5e5cb8422d 100644
- if (status)
- {
- ERR( "wine: failed to map the shared user data: %08x\n", status );
--@@ -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 );
-- }
--
--+extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
--
-+@@ -2977,7 +2977,7 @@ void virtual_clear_thread_stack( void *stack_end )
- /***********************************************************************
- * virtual_map_user_shared_data
- */
-@@ -102,7 +97,7 @@ index 660323d4dcc..a5e5cb8422d 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};
--@@ -2814,6 +2815,11 @@ void virtual_map_user_shared_data(void)
-+@@ -3000,6 +3000,11 @@ void virtual_map_user_shared_data(void)
- ERR( "failed to remap the process USD: %d\n", res );
- exit(1);
- }
-@@ -115,7 +110,7 @@ index 660323d4dcc..a5e5cb8422d 100644
- NtClose( section );
- }
- diff --git a/libs/wine/loader.c b/libs/wine/loader.c
--index 4597a6cb324..3d0d75e9c6d 100644
-+index 4597a6cb3243..3d0d75e9c6d3 100644
- --- a/libs/wine/loader.c
- +++ b/libs/wine/loader.c
- @@ -398,7 +398,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
-@@ -131,7 +126,7 @@ index 4597a6cb324..3d0d75e9c6d 100644
- sec++;
-
- diff --git a/server/mapping.c b/server/mapping.c
--index 0941dd87c05..002f3215af2 100644
-+index 0941dd87c05d..002f3215af2e 100644
- --- a/server/mapping.c
- +++ b/server/mapping.c
- @@ -964,7 +964,11 @@ struct object *create_user_data_mapping( struct object *root, const
struct unico
-@@ -148,7 +143,7 @@ index 0941dd87c05..002f3215af2 100644
- }
-
- diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
--index 74216f8bb6e..820516329a4 100644
-+index 74216f8bb6e7..820516329a47 100644
- --- a/tools/winebuild/parser.c
- +++ b/tools/winebuild/parser.c
- @@ -545,7 +545,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
-@@ -161,7 +156,7 @@ index 74216f8bb6e..820516329a4 100644
- if (odp->flags & (FLAG_FORWARD | FLAG_REGISTER))
- return 0;
- diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
--index 07d6eed05fc..9cc4698d0d7 100644
-+index 07d6eed05fcc..9cc4698d0d7d 100644
- --- a/tools/winebuild/spec32.c
- +++ b/tools/winebuild/spec32.c
- @@ -375,11 +375,11 @@ static void output_relay_debug( DLLSPEC *spec )
-diff --git
a/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
b/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
-index 69ee26be8..c3e065b26 100644
---- a/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
-+++ b/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
-@@ -1,4 +1,4 @@
--From 659e192979eecfb59d1c1b26e8cea78c42300de5 Mon Sep 17 00:00:00 2001
-+From feb53ed39179603391eff600ea59edc41407b238 Mon Sep 17 00:00:00 2001
- From: Paul Gofman <gofmanp(a)gmail.com>
- Date: Fri, 3 Jan 2020 17:39:08 +0300
- Subject: [PATCH] ntdll: Call NtOpenFile through syscall thunk.
-@@ -15,10 +15,10 @@ Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48410
- 7 files changed, 16 insertions(+), 8 deletions(-)
-
- diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
--index 1ca794ae3e5..b3c13042adc 100644
-+index a25cefa555ac..34ba0dc813c6 100644
- --- a/dlls/ntdll/actctx.c
- +++ b/dlls/ntdll/actctx.c
--@@ -2892,7 +2892,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name
)
-+@@ -2894,7 +2894,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name
)
- attr.ObjectName = name;
- attr.SecurityDescriptor = NULL;
- attr.SecurityQualityOfService = NULL;
-@@ -27,7 +27,7 @@ index 1ca794ae3e5..b3c13042adc 100644
- }
-
- static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct
assembly_identity* ai,
--@@ -3209,7 +3209,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct
assembly_identit
-+@@ -3211,7 +3211,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct
assembly_identit
- attr.SecurityDescriptor = NULL;
- attr.SecurityQualityOfService = NULL;
-
-@@ -37,10 +37,10 @@ index 1ca794ae3e5..b3c13042adc 100644
- {
- sxs_ai = *ai;
- diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
--index d18df38f626..69607a4fed9 100644
-+index 18428658a5b5..7a9de26ccb0c 100644
- --- a/dlls/ntdll/directory.c
- +++ b/dlls/ntdll/directory.c
--@@ -2943,7 +2943,7 @@ NTSTATUS DIR_get_unix_cwd( char **cwd )
-+@@ -3071,7 +3071,7 @@ NTSTATUS DIR_get_unix_cwd( char **cwd )
- attr.SecurityDescriptor = NULL;
- attr.SecurityQualityOfService = NULL;
-
-@@ -50,10 +50,10 @@ index d18df38f626..69607a4fed9 100644
- RtlFreeUnicodeString( &dirW );
- if (status != STATUS_SUCCESS) goto done;
- diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
--index 0b8c28a0651..e48cd84cffd 100644
-+index 51d989f30b45..8f1653b0d626 100644
- --- a/dlls/ntdll/loader.c
- +++ b/dlls/ntdll/loader.c
--@@ -2469,7 +2469,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name,
WINE_MODREF **pwm,
-+@@ -2521,7 +2521,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name,
WINE_MODREF **pwm,
- attr.ObjectName = nt_name;
- attr.SecurityDescriptor = NULL;
- attr.SecurityQualityOfService = NULL;
-@@ -63,10 +63,10 @@ index 0b8c28a0651..e48cd84cffd 100644
- FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE
)))
- {
- diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c
--index 0d0c1194d23..a1bf219ed0a 100644
-+index 15ccdeb2e637..928edcb04e2c 100644
- --- a/dlls/ntdll/locale.c
- +++ b/dlls/ntdll/locale.c
--@@ -661,7 +661,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
-+@@ -660,7 +660,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
- return STATUS_NO_MEMORY;
- valueW.Length = NTDLL_swprintf( valueW.Buffer, pathfmtW, dir, name ) *
sizeof(WCHAR);
- InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL );
-@@ -75,7 +75,7 @@ index 0d0c1194d23..a1bf219ed0a 100644
- if (!status) TRACE( "found %s\n", debugstr_w( valueW.Buffer ));
- RtlFreeUnicodeString( &valueW );
- if (status != STATUS_OBJECT_NAME_NOT_FOUND && status !=
STATUS_OBJECT_PATH_NOT_FOUND) return status;
--@@ -685,7 +685,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
-+@@ -684,7 +684,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
- wcscat( valueW.Buffer, name );
- valueW.Length = wcslen(valueW.Buffer) * sizeof(WCHAR);
- InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL );
-@@ -85,10 +85,10 @@ index 0d0c1194d23..a1bf219ed0a 100644
- }
- RtlFreeUnicodeString( &valueW );
- diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
--index 2e791b92f73..f8170793185 100644
-+index 9091d1ae8c77..f8e81ae49eaf 100644
- --- a/dlls/ntdll/ntdll_misc.h
- +++ b/dlls/ntdll/ntdll_misc.h
--@@ -350,4 +350,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src,
size_t len )
-+@@ -329,4 +329,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src,
size_t len )
- while (len--) *dst++ = (unsigned char)*src++;
- }
-
-@@ -102,7 +102,7 @@ index 2e791b92f73..f8170793185 100644
- +
- #endif
- diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
--index 32e1f951af5..71ae44dd498 100644
-+index 32e1f951af5c..71ae44dd4988 100644
- --- a/dlls/ntdll/path.c
- +++ b/dlls/ntdll/path.c
- @@ -1020,7 +1020,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*
dir)
-@@ -115,10 +115,10 @@ index 32e1f951af5..71ae44dd498 100644
- if (nts != STATUS_SUCCESS) goto out;
-
- diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
--index 60ee39765bf..70dfe6f768a 100644
-+index 884141da060c..32a1f5107f06 100644
- --- a/dlls/ntdll/process.c
- +++ b/dlls/ntdll/process.c
--@@ -1281,7 +1281,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, ULONG
attributes,
-+@@ -1357,7 +1357,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, ULONG
attributes,
-
- memset( info, 0, sizeof(*info) );
- InitializeObjectAttributes( &attr, path, attributes, 0, 0 );
diff --git a/wine.spec b/wine.spec
index 4308871..cd74653 100644
--- a/wine.spec
+++ b/wine.spec
@@ -76,8 +76,6 @@ Source150: wine.appdata.xml
# wine bugs
Patch100: wine-staging-5.10-ntdll.patch
-Patch101: wine-staging-5.10-ntdll-arm0.patch
-Patch102: wine-staging-5.10-ntdll-arm1.patch
# desktop dir
Source200: wine.menu
@@ -696,10 +694,15 @@ This package adds the opencl driver for wine.
# setup and apply wine-staging patches
gzip -dc %{SOURCE900} | tar -xf - --strip-components=1
%patch100 -p1 -b.ntdll
-%patch101 -p1 -b.ntdll-arm0
-%patch102 -p1 -b.ntdll-arm1
+%ifarch %{arm} aarch64
+patches/patchinstall.sh DESTDIR="`pwd`" --all \
+ -W ntdll-NtContinue \
+ -W ntdll-Syscall_Emulation \
+ -W winebuild-Fake_Dlls
+%else
patches/patchinstall.sh DESTDIR="`pwd`" --all
+%endif
# fix parallelized build
sed -i -e 's!^loader server: libs/port libs/wine tools.*!& include!'
Makefile.in
commit e1141d482fdb1aaa711f637ee76b6ad58c996543
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Thu Jun 11 08:55:00 2020 -0500
ARM patchset requires a previous patch
I may back out this patchset if this fails again
diff --git a/wine-staging-5.10-ntdll-arm0.patch b/wine-staging-5.10-ntdll-arm0.patch
new file mode 100644
index 0000000..74f1f00
--- /dev/null
+++ b/wine-staging-5.10-ntdll-arm0.patch
@@ -0,0 +1,964 @@
+From 9a4c8c5631101f8571dbdce726ae864060e446c9 Mon Sep 17 00:00:00 2001
+From: Zebediah Figura <z.figura12(a)gmail.com>
+Date: Mon, 8 Jun 2020 15:59:31 -0500
+Subject: [PATCH] Rebase against 17529582402ebe27ef975fc7dcb8353f4f95e629.
+
+---
+ ...ase-Maintain-FLS-storage-list-in-PEB.patch | 44 ++--
+ .../0001-ntdll-Add-stub-for-NtContinue.patch | 63 ------
+ ...o-continue-execution-after-exception.patch | 82 --------
+ patches/ntdll-NtContinue/definition | 3 -
+ ...dll-Support-x86_64-syscall-emulation.patch | 14 +-
+ ...mporary-signal-handler-during-proces.patch | 32 +--
+ patches/patchinstall.sh | 198 ++++++++----------
+ ...ate-syscall-thunks-for-ntdll-exports.patch | 34 +--
+ ...e-client-side-file-descriptor-cache-.patch | 20 +-
+ staging/upstream-commit | 2 +-
+ 10 files changed, 156 insertions(+), 336 deletions(-)
+ delete mode 100644 patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
+ delete mode 100644
patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
+ delete mode 100644 patches/ntdll-NtContinue/definition
+
+diff --git
a/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
b/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
+index 1d5434bf6..40f2a0b86 100644
+--- a/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
++++ b/patches/ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch
+@@ -1,4 +1,4 @@
+-From 5c370d9f0be803d89302da7471ef0b93b45a0d75 Mon Sep 17 00:00:00 2001
++From 3fe24d6e3b216c21b6a7b68766414213fdd2ff2d Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <pgofman(a)codeweavers.com>
+ Date: Thu, 23 Apr 2020 14:32:23 +0300
+ Subject: [PATCH] kernelbase: Maintain FLS storage list in PEB.
+@@ -73,10 +73,10 @@ index 7501165dc87..2bcc3ee60c4 100644
+ * FlsFree should fail
+ * FlsGetValue and FlsSetValue should succeed
+ diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
+-index a454bf118cc..dac30959734 100644
++index a9869863b44..b24f9e98bc7 100644
+ --- a/dlls/kernel32/tests/thread.c
+ +++ b/dlls/kernel32/tests/thread.c
+-@@ -2435,7 +2435,6 @@ START_TEST(thread)
++@@ -2377,7 +2377,6 @@ START_TEST(thread)
+ }
+ return;
+ }
+@@ -84,7 +84,7 @@ index a454bf118cc..dac30959734 100644
+ test_thread_info();
+ test_reserved_tls();
+ test_CreateRemoteThread();
+-@@ -2463,6 +2462,5 @@ START_TEST(thread)
++@@ -2405,6 +2404,5 @@ START_TEST(thread)
+ test_thread_fpu_cw();
+ test_thread_actctx();
+ test_thread_description();
+@@ -92,7 +92,7 @@ index a454bf118cc..dac30959734 100644
+ test_threadpool();
+ }
+ diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c
+-index 03b16da95bb..4409f120491 100644
++index f20d460d07d..3c77b6a42f4 100644
+ --- a/dlls/kernelbase/thread.c
+ +++ b/dlls/kernelbase/thread.c
+ @@ -38,6 +38,10 @@
+@@ -106,7 +106,7 @@ index 03b16da95bb..4409f120491 100644
+
+ /***********************************************************************
+ * Threads
+-@@ -916,6 +920,19 @@ static void init_fiber_context( struct fiber_data *fiber )
++@@ -915,6 +919,19 @@ static void init_fiber_context( struct fiber_data *fiber )
+ #endif
+ }
+
+@@ -126,7 +126,7 @@ index 03b16da95bb..4409f120491 100644
+
+ /***********************************************************************
+ * CreateFiber (kernelbase.@)
+-@@ -1023,7 +1040,16 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr )
++@@ -1022,7 +1039,16 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr )
+ RtlExitUserThread( 1 );
+ }
+ RtlFreeUserStack( fiber->stack_allocation );
+@@ -144,7 +144,7 @@ index 03b16da95bb..4409f120491 100644
+ HeapFree( GetProcessHeap(), 0, fiber );
+ }
+
+-@@ -1045,6 +1071,19 @@ void WINAPI DECLSPEC_HOTPATCH SwitchToFiber( LPVOID fiber )
++@@ -1044,6 +1070,19 @@ void WINAPI DECLSPEC_HOTPATCH SwitchToFiber( LPVOID fiber )
+ struct fiber_data *new_fiber = fiber;
+ struct fiber_data *current_fiber = NtCurrentTeb()->Tib.u.FiberData;
+
+@@ -164,7 +164,7 @@ index 03b16da95bb..4409f120491 100644
+ current_fiber->except = NtCurrentTeb()->Tib.ExceptionList;
+ current_fiber->stack_limit = NtCurrentTeb()->Tib.StackLimit;
+ current_fiber->fls_slots = NtCurrentTeb()->FlsSlots;
+-@@ -1070,9 +1109,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
++@@ -1069,9 +1108,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
+ PEB * const peb = NtCurrentTeb()->Peb;
+
+ RtlAcquirePebLock();
+@@ -175,7 +175,7 @@ index 03b16da95bb..4409f120491 100644
+ {
+ SetLastError( ERROR_NOT_ENOUGH_MEMORY );
+ index = FLS_OUT_OF_INDEXES;
+-@@ -1082,9 +1119,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
++@@ -1081,9 +1118,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
+ index = RtlFindClearBitsAndSet( peb->FlsBitmap, 1, 1 );
+ if (index != ~0U)
+ {
+@@ -186,7 +186,7 @@ index 03b16da95bb..4409f120491 100644
+ {
+ RtlClearBits( peb->FlsBitmap, index, 1 );
+ index = FLS_OUT_OF_INDEXES;
+-@@ -1092,8 +1127,8 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
++@@ -1091,8 +1126,8 @@ DWORD WINAPI DECLSPEC_HOTPATCH FlsAlloc( PFLS_CALLBACK_FUNCTION
callback )
+ }
+ else
+ {
+@@ -197,7 +197,7 @@ index 03b16da95bb..4409f120491 100644
+ }
+ }
+ else SetLastError( ERROR_NO_MORE_ITEMS );
+-@@ -1117,7 +1152,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsFree( DWORD index )
++@@ -1116,7 +1151,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsFree( DWORD index )
+ {
+ /* FIXME: call Fls callback */
+ /* FIXME: add equivalent of ThreadZeroTlsCell here */
+@@ -206,7 +206,7 @@ index 03b16da95bb..4409f120491 100644
+ }
+ else SetLastError( ERROR_INVALID_PARAMETER );
+ RtlReleasePebLock();
+-@@ -1136,7 +1171,7 @@ PVOID WINAPI DECLSPEC_HOTPATCH FlsGetValue( DWORD index )
++@@ -1135,7 +1170,7 @@ PVOID WINAPI DECLSPEC_HOTPATCH FlsGetValue( DWORD index )
+ return NULL;
+ }
+ SetLastError( ERROR_SUCCESS );
+@@ -215,7 +215,7 @@ index 03b16da95bb..4409f120491 100644
+ }
+
+
+-@@ -1150,14 +1185,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsSetValue( DWORD index, PVOID
data )
++@@ -1149,14 +1184,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlsSetValue( DWORD index, PVOID
data )
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return FALSE;
+ }
+@@ -233,10 +233,10 @@ index 03b16da95bb..4409f120491 100644
+ }
+
+ diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
+-index 5e8de8821dd..71ef1cfea0a 100644
++index ffbc9fabb23..be53d98e5b8 100644
+ --- a/dlls/ntdll/loader.c
+ +++ b/dlls/ntdll/loader.c
+-@@ -179,6 +179,15 @@ static CRITICAL_SECTION_DEBUG dlldir_critsect_debug =
++@@ -169,6 +169,15 @@ static CRITICAL_SECTION_DEBUG dlldir_critsect_debug =
+ };
+ static CRITICAL_SECTION dlldir_section = { &dlldir_critsect_debug, -1, 0, 0, 0, 0
};
+
+@@ -252,7 +252,7 @@ index 5e8de8821dd..71ef1cfea0a 100644
+ static WINE_MODREF *cached_modref;
+ static WINE_MODREF *current_modref;
+ static WINE_MODREF *last_failed_modref;
+-@@ -219,6 +228,16 @@ static RTL_UNLOAD_EVENT_TRACE
unload_traces[RTL_UNLOAD_EVENT_TRACE_NUMBER];
++@@ -209,6 +218,16 @@ static RTL_UNLOAD_EVENT_TRACE
unload_traces[RTL_UNLOAD_EVENT_TRACE_NUMBER];
+ static RTL_UNLOAD_EVENT_TRACE *unload_trace_ptr;
+ static unsigned int unload_trace_seq;
+
+@@ -269,7 +269,7 @@ index 5e8de8821dd..71ef1cfea0a 100644
+ static void module_push_unload_trace( const LDR_DATA_TABLE_ENTRY *ldr )
+ {
+ RTL_UNLOAD_EVENT_TRACE *ptr = &unload_traces[unload_trace_seq];
+-@@ -3913,6 +3932,13 @@ void WINAPI LdrShutdownThread(void)
++@@ -3610,6 +3629,13 @@ void WINAPI LdrShutdownThread(void)
+ /* don't do any detach calls if process is exiting */
+ if (process_detaching) return;
+
+@@ -283,15 +283,15 @@ index 5e8de8821dd..71ef1cfea0a 100644
+ RtlEnterCriticalSection( &loader_section );
+
+ mark =
&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
+-@@ -4153,6 +4179,7 @@ static void user_shared_data_init(void)
++@@ -3819,6 +3845,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
+ */
+ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknown3,
ULONG_PTR unknown4 )
+ {
+ + static const unsigned int fls_slot_count = 8 *
sizeof(NtCurrentTeb()->Peb->FlsBitmapBits);
+- static const LARGE_INTEGER zero;
+ static int attach_done;
+ int i;
+-@@ -4191,6 +4218,25 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
++ NTSTATUS status;
++@@ -3856,6 +3883,25 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
+ InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
+ RtlReleasePebLock();
+
+@@ -318,5 +318,5 @@ index 5e8de8821dd..71ef1cfea0a 100644
+ {
+ attach_done = 1;
+ --
+-2.25.3
++2.26.2
+
+diff --git a/patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
b/patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
+deleted file mode 100644
+index 7145857bd..000000000
+--- a/patches/ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
++++ /dev/null
+@@ -1,63 +0,0 @@
+-From 9ea4f081689959bd393eab2caaa0ed8237846117 Mon Sep 17 00:00:00 2001
+-From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+-Date: Thu, 25 May 2017 05:04:26 +0200
+-Subject: [PATCH] ntdll: Add stub for NtContinue.
+-
+----
+- dlls/ntdll/exception.c | 10 +++++++++-
+- dlls/ntdll/ntdll.spec | 4 ++--
+- 2 files changed, 11 insertions(+), 3 deletions(-)
+-
+-diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
+-index c35312fd1d1..3b85f1efa04 100644
+---- a/dlls/ntdll/exception.c
+-+++ b/dlls/ntdll/exception.c
+-@@ -328,7 +328,6 @@ LONG WINAPI call_unhandled_exception_filter( PEXCEPTION_POINTERS
eptr )
+- return unhandled_exception_filter( eptr );
+- }
+-
+--
+- #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
+-
+- struct dynamic_unwind_entry
+-@@ -667,6 +666,15 @@ PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry( ULONG_PTR pc,
ULONG_PTR *base,
+-
+- #endif /* __x86_64__ || __arm__ || __aarch64__ */
+-
+-+/*********************************************************************
+-+ * NtContinue (NTDLL.@)
+-+ */
+-+NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alert )
+-+{
+-+ FIXME( "(%p, %d) stub!\n", context, alert );
+-+ return STATUS_NOT_IMPLEMENTED;
+-+}
+-+
+- /*************************************************************
+- * __wine_spec_unimplemented_stub
+- *
+-diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
+-index 81faf7fc280..d21a6f08ac2 100644
+---- a/dlls/ntdll/ntdll.spec
+-+++ b/dlls/ntdll/ntdll.spec
+-@@ -150,7 +150,7 @@
+- @ stdcall NtCompleteConnectPort(ptr)
+- # @ stub NtCompressKey
+- @ stdcall NtConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr)
+--@ stub NtContinue
+-+@ stdcall NtContinue(ptr long)
+- # @ stub NtCreateDebugObject
+- @ stdcall NtCreateDirectoryObject(ptr long ptr)
+- @ stdcall NtCreateEvent(ptr long ptr long long)
+-@@ -1105,7 +1105,7 @@
+- @ stdcall -private ZwCompleteConnectPort(ptr) NtCompleteConnectPort
+- # @ stub ZwCompressKey
+- @ stdcall -private ZwConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr) NtConnectPort
+--@ stub ZwContinue
+-+@ stdcall -private ZwContinue(ptr long) NtContinue
+- # @ stub ZwCreateDebugObject
+- @ stdcall -private ZwCreateDirectoryObject(ptr long ptr) NtCreateDirectoryObject
+- @ stdcall -private ZwCreateEvent(ptr long ptr long long) NtCreateEvent
+---
+-2.17.1
+-
+diff --git
a/patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
b/patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
+deleted file mode 100644
+index 902940977..000000000
+---
a/patches/ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
++++ /dev/null
+@@ -1,82 +0,0 @@
+-From 812de54c6fc8f93e8fda01f0802397b183adab59 Mon Sep 17 00:00:00 2001
+-From: Andrew Wesie <awesie(a)gmail.com>
+-Date: Fri, 27 Jul 2018 01:26:56 -0500
+-Subject: [PATCH] ntdll: Use NtContinue to continue execution after exceptions.
+-
+-NtContinue is exported by ntdll and some programs expect it to be used to
+-restore the thread context after an exception handler returns
+-EXCEPTION_CONTINUE_EXECUTION. It must take a context as its first argument
+-and restore that context.
+-
+-Current implementation is a simple wrapper around NtSetContextThread. It is
+-unlikely that it has the correct behavior if called by an external caller.
+-
+-The __syscall_NtContinue wrapper is used so that it can be hooked by a
+-third-party.
+----
+- dlls/ntdll/exception.c | 5 +++--
+- dlls/ntdll/signal_i386.c | 3 ++-
+- dlls/ntdll/signal_x86_64.c | 3 ++-
+- 3 files changed, 7 insertions(+), 4 deletions(-)
+-
+-diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
+-index 3b85f1efa..bc972254f 100644
+---- a/dlls/ntdll/exception.c
+-+++ b/dlls/ntdll/exception.c
+-@@ -671,8 +671,9 @@ PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry( ULONG_PTR pc,
ULONG_PTR *base,
+- */
+- NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alert )
+- {
+-- FIXME( "(%p, %d) stub!\n", context, alert );
+-- return STATUS_NOT_IMPLEMENTED;
+-+ TRACE( "(%p, %d) stub!\n", context, alert );
+-+
+-+ return NtSetContextThread( GetCurrentThread(), context );
+- }
+-
+- /*************************************************************
+-diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
+-index e55164630..8fc885ed4 100644
+---- a/dlls/ntdll/signal_i386.c
+-+++ b/dlls/ntdll/signal_i386.c
+-@@ -730,6 +730,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT
*context )
+- return STATUS_UNHANDLED_EXCEPTION;
+- }
+-
+-+NTSTATUS WINAPI __syscall_NtContinue( CONTEXT *context, BOOLEAN alert );
+-
+- /*******************************************************************
+- * raise_exception
+-@@ -794,7 +795,7 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT
*context, BOOL f
+- NtTerminateProcess( NtCurrentProcess(), rec->ExceptionCode );
+- }
+- done:
+-- return NtSetContextThread( GetCurrentThread(), context );
+-+ return __syscall_NtContinue( context, FALSE );
+- }
+-
+-
+-diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
+-index e48529d73..0e74fda43 100644
+---- a/dlls/ntdll/signal_x86_64.c
+-+++ b/dlls/ntdll/signal_x86_64.c
+-@@ -2520,6 +2520,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec,
CONTEXT *orig_contex
+- return STATUS_UNHANDLED_EXCEPTION;
+- }
+-
+-+NTSTATUS WINAPI __syscall_NtContinue( CONTEXT *context, BOOLEAN alert );
+-
+- static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
first_chance )
+- {
+-@@ -2582,7 +2583,7 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT
*context, BOOL f
+- }
+-
+- done:
+-- return NtSetContextThread( GetCurrentThread(), context );
+-+ return __syscall_NtContinue( context, FALSE );
+- }
+-
+-
+---
+-2.23.0
+-
+diff --git a/patches/ntdll-NtContinue/definition b/patches/ntdll-NtContinue/definition
+deleted file mode 100644
+index 06c2ebf9e..000000000
+--- a/patches/ntdll-NtContinue/definition
++++ /dev/null
+@@ -1,3 +0,0 @@
+-Fixes: [31910] Add stub for NtContinue
+-Fixes: [45572] League of Legends 8.12+ fails to start a game (anticheat engine, hooking
of NtContinue)
+-Depends: winebuild-Fake_Dlls
+\ No newline at end of file
+diff --git
a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
+index 4ae5fcdfa..0a39d4355 100644
+--- a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
++++ b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
+@@ -1,4 +1,4 @@
+-From 20298be5a42af52be27c56f88ad6a8a0304b55b6 Mon Sep 17 00:00:00 2001
++From cd04d1910294b035bb3858b3ef1bb295aec3a732 Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <pgofman(a)codeweavers.com>
+ Date: Mon, 30 Dec 2019 13:27:53 +0300
+ Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
+@@ -15,7 +15,7 @@ is used for trapping syscalls.
+ 3 files changed, 119 insertions(+), 2 deletions(-)
+
+ diff --git a/configure.ac b/configure.ac
+-index e3d63ed7501..2fbec4129df 100644
++index e61a98455c3..4adeb52d225 100644
+ --- a/configure.ac
+ +++ b/configure.ac
+ @@ -464,6 +464,7 @@ AC_CHECK_HEADERS(\
+@@ -27,7 +27,7 @@ index e3d63ed7501..2fbec4129df 100644
+ linux/types.h \
+ linux/ucdrom.h \
+ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
+-index 0ccc7cbceb6..149ad1bf5e7 100644
++index dd8b45fa907..a5612abf2b1 100644
+ --- a/dlls/ntdll/signal_x86_64.c
+ +++ b/dlls/ntdll/signal_x86_64.c
+ @@ -24,6 +24,7 @@
+@@ -61,8 +61,8 @@ index 0ccc7cbceb6..149ad1bf5e7 100644
+ typedef struct _SCOPE_TABLE
+ {
+ ULONG Count;
+-@@ -2797,6 +2807,104 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void
*ucontext )
+- restore_context( &context, ucontext );
++@@ -2480,6 +2490,104 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
++ return 0;
+ }
+
+ +extern unsigned int __wine_nb_syscalls;
+@@ -165,8 +165,8 @@ index 0ccc7cbceb6..149ad1bf5e7 100644
+ +}
+
+ /***********************************************************************
+- * __wine_set_signal_handler (NTDLL.@)
+-@@ -2842,6 +2950,9 @@ void signal_init_process(void)
++ * handle_interrupt
++@@ -2793,6 +2901,9 @@ void signal_init_process(void)
+ sig_act.sa_sigaction = trap_handler;
+ if (sigaction( SIGTRAP, &sig_act, NULL ) == -1) goto error;
+ #endif
+diff --git
a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
+index d6e9a6824..db0631234 100644
+---
a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
++++
b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch
+@@ -1,4 +1,4 @@
+-From 46968c583a30476a86463530d0047699e64529b5 Mon Sep 17 00:00:00 2001
++From bd60a4308f3ec1df20328887335b4c95f9be215d Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Sat, 4 Oct 2014 02:53:22 +0200
+ Subject: [PATCH] ntdll: Setup a temporary signal handler during process
+@@ -27,10 +27,10 @@ index 65c65cc02d8..63a4b597872 100644
+ extern void debug_init(void) DECLSPEC_HIDDEN;
+ extern TEB *thread_init( SIZE_T *info_size, BOOL *suspend ) DECLSPEC_HIDDEN;
+ diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c
+-index 8ff9f66d3f0..44e3d2df523 100644
++index a09848449a6..c6f7231fec6 100644
+ --- a/dlls/ntdll/signal_arm.c
+ +++ b/dlls/ntdll/signal_arm.c
+-@@ -773,6 +773,12 @@ void signal_init_process(void)
++@@ -792,6 +792,12 @@ void signal_init_process(void)
+ exit(1);
+ }
+
+@@ -44,11 +44,11 @@ index 8ff9f66d3f0..44e3d2df523 100644
+ /***********************************************************************
+ * RtlUnwind (NTDLL.@)
+ diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
+-index 104ffbf6df9..e7c6abd0046 100644
++index a9a58a2e7ad..a9c6614794e 100644
+ --- a/dlls/ntdll/signal_arm64.c
+ +++ b/dlls/ntdll/signal_arm64.c
+-@@ -1100,6 +1100,12 @@ int CDECL __wine_set_signal_handler(unsigned int sig,
wine_signal_handler wsh)
+- return 0;
++@@ -1047,6 +1047,12 @@ static void usr2_handler( int signal, siginfo_t *siginfo, void
*sigcontext )
++ restore_context( context, sigcontext );
+ }
+
+ +/**********************************************************************
+@@ -61,10 +61,10 @@ index 104ffbf6df9..e7c6abd0046 100644
+ /**********************************************************************
+ * signal_init_process
+ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
+-index 1b0b9352a87..0fe9f7a3c84 100644
++index 83868f25121..b048b2bc688 100644
+ --- a/dlls/ntdll/signal_i386.c
+ +++ b/dlls/ntdll/signal_i386.c
+-@@ -1621,6 +1621,31 @@ static BOOL handle_interrupt( unsigned int interrupt, ucontext_t
*sigcontext, st
++@@ -1575,6 +1575,31 @@ static BOOL handle_interrupt( unsigned int interrupt, ucontext_t
*sigcontext, st
+ }
+
+
+@@ -96,7 +96,7 @@ index 1b0b9352a87..0fe9f7a3c84 100644
+ /**********************************************************************
+ * segv_handler
+ *
+-@@ -1948,6 +1973,34 @@ void signal_init_process(void)
++@@ -1883,6 +1908,34 @@ void signal_init_process(void)
+ exit(1);
+ }
+
+@@ -132,11 +132,11 @@ index 1b0b9352a87..0fe9f7a3c84 100644
+ /*******************************************************************
+ * RtlUnwind (NTDLL.@)
+ diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c
+-index 7e73322cbeb..07f0b89f30a 100644
++index 879b2b58c49..f17d6267102 100644
+ --- a/dlls/ntdll/signal_powerpc.c
+ +++ b/dlls/ntdll/signal_powerpc.c
+-@@ -637,6 +637,12 @@ int CDECL __wine_set_signal_handler(unsigned int sig,
wine_signal_handler wsh)
+- return 0;
++@@ -634,6 +634,12 @@ static void quit_handler( int signal, siginfo_t *siginfo, void
*sigcontext )
++ unix_funcs->abort_thread(0);
+ }
+
+ +/**********************************************************************
+@@ -147,12 +147,12 @@ index 7e73322cbeb..07f0b89f30a 100644
+ +}
+
+ /**********************************************************************
+- * signal_init_process
++ * usr1_handler
+ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
+-index 0ccc7cbceb6..dc8a1a987c5 100644
++index c6b0fbf618d..bb481ba1b81 100644
+ --- a/dlls/ntdll/signal_x86_64.c
+ +++ b/dlls/ntdll/signal_x86_64.c
+-@@ -2849,6 +2849,12 @@ void signal_init_process(void)
++@@ -2777,6 +2777,12 @@ void signal_init_process(void)
+ exit(1);
+ }
+
+@@ -166,7 +166,7 @@ index 0ccc7cbceb6..dc8a1a987c5 100644
+ static ULONG64 get_int_reg( CONTEXT *context, int reg )
+ {
+ diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
+-index 8918b39a9c5..a2f5df1b1c2 100644
++index d045466f6d2..49daa33ca58 100644
+ --- a/dlls/ntdll/thread.c
+ +++ b/dlls/ntdll/thread.c
+ @@ -186,6 +186,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
+diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh
+index c5ff8c0b3..9c2ce4ce0 100755
+--- a/patches/patchinstall.sh
++++ b/patches/patchinstall.sh
+@@ -52,7 +52,7 @@ usage()
+ # Get the upstream commit sha
+ upstream_commit()
+ {
+- echo "3cc3b445752902e07231900befc296f74ad6576e"
++ echo "17529582402ebe27ef975fc7dcb8353f4f95e629"
+ }
+
+ # Show version information
+@@ -183,7 +183,6 @@ patch_enable_all ()
+ enable_ntdll_Junction_Points="$1"
+ enable_ntdll_Manifest_Range="$1"
+ enable_ntdll_NtAccessCheck="$1"
+- enable_ntdll_NtContinue="$1"
+ enable_ntdll_NtDevicePath="$1"
+ enable_ntdll_NtQueryEaFile="$1"
+ enable_ntdll_NtQuerySection="$1"
+@@ -648,9 +647,6 @@ patch_enable ()
+ ntdll-NtAccessCheck)
+ enable_ntdll_NtAccessCheck="$2"
+ ;;
+- ntdll-NtContinue)
+- enable_ntdll_NtContinue="$2"
+- ;;
+ ntdll-NtDevicePath)
+ enable_ntdll_NtDevicePath="$2"
+ ;;
+@@ -1672,6 +1668,17 @@ if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
+ enable_winebuild_Fake_Dlls=1
+ fi
+
++if test "$enable_winebuild_Fake_Dlls" -eq 1; then
++ if test "$enable_ntdll_WRITECOPY" -gt 1; then
++ abort "Patchset ntdll-WRITECOPY disabled, but winebuild-Fake_Dlls depends on
that."
++ fi
++ if test "$enable_ws2_32_WSACleanup" -gt 1; then
++ abort "Patchset ws2_32-WSACleanup disabled, but winebuild-Fake_Dlls depends on
that."
++ fi
++ enable_ntdll_WRITECOPY=1
++ enable_ws2_32_WSACleanup=1
++fi
++
+ if test "$enable_ntdll_NtQueryEaFile" -eq 1; then
+ if test "$enable_ntdll_Junction_Points" -gt 1; then
+ abort "Patchset ntdll-Junction_Points disabled, but ntdll-NtQueryEaFile depends
on that."
+@@ -1686,24 +1693,6 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then
+ enable_ntdll_Pipe_SpecialCharacters=1
+ fi
+
+-if test "$enable_ntdll_NtContinue" -eq 1; then
+- if test "$enable_winebuild_Fake_Dlls" -gt 1; then
+- abort "Patchset winebuild-Fake_Dlls disabled, but ntdll-NtContinue depends on
that."
+- fi
+- enable_winebuild_Fake_Dlls=1
+-fi
+-
+-if test "$enable_winebuild_Fake_Dlls" -eq 1; then
+- if test "$enable_ntdll_WRITECOPY" -gt 1; then
+- abort "Patchset ntdll-WRITECOPY disabled, but winebuild-Fake_Dlls depends on
that."
+- fi
+- if test "$enable_ws2_32_WSACleanup" -gt 1; then
+- abort "Patchset ws2_32-WSACleanup disabled, but winebuild-Fake_Dlls depends on
that."
+- fi
+- enable_ntdll_WRITECOPY=1
+- enable_ws2_32_WSACleanup=1
+-fi
+-
+ if test "$enable_ntdll_Hide_Wine_Exports" -eq 1; then
+ if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then
+ abort "Patchset advapi32-Token_Integrity_Level disabled, but
ntdll-Hide_Wine_Exports depends on that."
+@@ -3977,98 +3966,6 @@ if test "$enable_ntdll_NtAccessCheck" -eq 1; then
+ ) >> "$patchlist"
+ fi
+
+-# Patchset ws2_32-WSACleanup
+-# |
+-# | This patchset fixes the following Wine bugs:
+-# | * [#18670] Properly close sockets when WSACleanup is called
+-# |
+-# | Modified files:
+-# | * dlls/ntdll/ntdll.spec, dlls/ntdll/server.c, dlls/ntdll/unix/loader.c,
dlls/ntdll/unix/server.c,
+-# | dlls/ntdll/unix/unix_private.h, dlls/ntdll/unixlib.h, dlls/ws2_32/socket.c,
dlls/ws2_32/tests/sock.c,
+-# | include/wine/server.h, server/protocol.def, server/sock.c
+-# |
+-if test "$enable_ws2_32_WSACleanup" -eq 1; then
+- patch_apply
ws2_32-WSACleanup/0001-ws2_32-Proper-WSACleanup-implementation-using-winese.patch
+- patch_apply
ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
+- (
+- printf '%s\n' '+ { "Matt Durgavich", "ws2_32: Proper
WSACleanup implementation using wineserver function.", 2 },';
+- printf '%s\n' '+ { "Sebastian Lackner", "ws2_32:
Invalidate client-side file descriptor cache in WSACleanup.", 1 },';
+- ) >> "$patchlist"
+-fi
+-
+-# Patchset winebuild-Fake_Dlls
+-# |
+-# | This patchset has the following (direct or indirect) dependencies:
+-# | * ntdll-WRITECOPY, ws2_32-WSACleanup
+-# |
+-# | This patchset fixes the following Wine bugs:
+-# | * [#21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare
Iron) crash on startup unless '--no-
+-# | sandbox' is used (native API sandboxing/hooking scheme incompatible with Wine)
+-# | * [#42741] StarCraft I: 1.18 PTR fails to initialize ClientSdk.dll
+-# | * [#45349] Multiple applications and games crash due to missing support for 64-bit
syscall thunks (StreetFighter V)
+-# | * [#45573] League of Legends 8.12+ fails to start a game (anticheat engine,
hooking of syscall return instructions)
+-# | * [#45650] chromium 32-bit sandbox expects different syscall thunks depending on
Windows version
+-# |
+-# | Modified files:
+-# | * dlls/dbghelp/cpu_i386.c, dlls/kernel32/tests/loader.c,
dlls/krnl386.exe16/kernel.c,
+-# | dlls/krnl386.exe16/kernel16_private.h, dlls/krnl386.exe16/ne_module.c,
dlls/krnl386.exe16/ne_segment.c,
+-# | dlls/krnl386.exe16/task.c, dlls/krnl386.exe16/thunk.c,
dlls/krnl386.exe16/wowthunk.c, dlls/ntdll/actctx.c,
+-# | dlls/ntdll/directory.c, dlls/ntdll/loader.c, dlls/ntdll/locale.c,
dlls/ntdll/ntdll_misc.h, dlls/ntdll/path.c,
+-# | dlls/ntdll/process.c, dlls/ntdll/signal_i386.c, dlls/ntdll/tests/exception.c,
dlls/ntdll/thread.c,
+-# | dlls/ntdll/unix/thread.c, dlls/ntdll/unix/unix_private.h,
dlls/ntdll/unix/virtual.c, dlls/ntdll/unixlib.h,
+-# | dlls/system.drv16/system.c, dlls/toolhelp.dll16/toolhelp.c,
dlls/user.exe16/message.c, dlls/user.exe16/user.c,
+-# | dlls/user.exe16/window.c, include/winternl.h, libs/wine/loader.c, server/mapping.c,
tools/winebuild/build.h,
+-# | tools/winebuild/import.c, tools/winebuild/parser.c, tools/winebuild/relay.c,
tools/winebuild/res32.c,
+-# | tools/winebuild/spec16.c, tools/winebuild/spec32.c, tools/winebuild/utils.c
+-# |
+-if test "$enable_winebuild_Fake_Dlls" -eq 1; then
+- patch_apply
winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
+- patch_apply
winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
+- patch_apply
winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
+- patch_apply
winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
+- patch_apply winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
+- patch_apply winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
+- patch_apply
winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
+- patch_apply
winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
+- patch_apply
winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
+- patch_apply
winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
+- patch_apply winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
+- (
+- printf '%s\n' '+ { "Michael Müller", "kernel32/tests:
Add basic tests for fake dlls.", 1 },';
+- printf '%s\n' '+ { "Sebastian Lackner", "krnl386.exe16:
Do not abuse WOW32Reserved field for 16-bit stack address.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "winebuild:
Generate syscall thunks for ntdll exports.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "winebuild: Use
multipass label system to generate fake dlls.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "winebuild: Add
stub functions in fake dlls.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "winebuild: Add
syscall thunks in fake dlls.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "winebuild: Fix
size of relocation information in fake dlls.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "winebuild: Try to
make sure RVA matches between fake and builtin DLLs.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "libs/wine: Use
same file alignment for fake and builtin DLLs.", 1 },';
+- printf '%s\n' '+ { "Michael Müller", "tools/winebuild:
Add syscall thunks for 64 bit.", 1 },';
+- printf '%s\n' '+ { "Paul Gofman", "ntdll: Call
NtOpenFile through syscall thunk.", 1 },';
+- ) >> "$patchlist"
+-fi
+-
+-# Patchset ntdll-NtContinue
+-# |
+-# | This patchset has the following (direct or indirect) dependencies:
+-# | * ntdll-WRITECOPY, ws2_32-WSACleanup, winebuild-Fake_Dlls
+-# |
+-# | This patchset fixes the following Wine bugs:
+-# | * [#31910] Add stub for NtContinue
+-# | * [#45572] League of Legends 8.12+ fails to start a game (anticheat engine,
hooking of NtContinue)
+-# |
+-# | Modified files:
+-# | * dlls/ntdll/exception.c, dlls/ntdll/ntdll.spec, dlls/ntdll/signal_i386.c,
dlls/ntdll/signal_x86_64.c
+-# |
+-if test "$enable_ntdll_NtContinue" -eq 1; then
+- patch_apply ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
+- patch_apply
ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
+- (
+- printf '%s\n' '+ { "Michael Müller", "ntdll: Add stub
for NtContinue.", 1 },';
+- printf '%s\n' '+ { "Andrew Wesie", "ntdll: Use
NtContinue to continue execution after exceptions.", 1 },';
+- ) >> "$patchlist"
+-fi
+-
+ # Patchset ntdll-Pipe_SpecialCharacters
+ # |
+ # | This patchset fixes the following Wine bugs:
+@@ -4213,6 +4110,77 @@ if test "$enable_ntdll_Status_Mapping" -eq 1; then
+ ) >> "$patchlist"
+ fi
+
++# Patchset ws2_32-WSACleanup
++# |
++# | This patchset fixes the following Wine bugs:
++# | * [#18670] Properly close sockets when WSACleanup is called
++# |
++# | Modified files:
++# | * dlls/ntdll/ntdll.spec, dlls/ntdll/server.c, dlls/ntdll/unix/loader.c,
dlls/ntdll/unix/server.c,
++# | dlls/ntdll/unix/unix_private.h, dlls/ntdll/unixlib.h, dlls/ws2_32/socket.c,
dlls/ws2_32/tests/sock.c,
++# | include/wine/server.h, server/protocol.def, server/sock.c
++# |
++if test "$enable_ws2_32_WSACleanup" -eq 1; then
++ patch_apply
ws2_32-WSACleanup/0001-ws2_32-Proper-WSACleanup-implementation-using-winese.patch
++ patch_apply
ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
++ (
++ printf '%s\n' '+ { "Matt Durgavich", "ws2_32: Proper
WSACleanup implementation using wineserver function.", 2 },';
++ printf '%s\n' '+ { "Sebastian Lackner", "ws2_32:
Invalidate client-side file descriptor cache in WSACleanup.", 1 },';
++ ) >> "$patchlist"
++fi
++
++# Patchset winebuild-Fake_Dlls
++# |
++# | This patchset has the following (direct or indirect) dependencies:
++# | * ntdll-WRITECOPY, ws2_32-WSACleanup
++# |
++# | This patchset fixes the following Wine bugs:
++# | * [#21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare
Iron) crash on startup unless '--no-
++# | sandbox' is used (native API sandboxing/hooking scheme incompatible with Wine)
++# | * [#42741] StarCraft I: 1.18 PTR fails to initialize ClientSdk.dll
++# | * [#45349] Multiple applications and games crash due to missing support for 64-bit
syscall thunks (StreetFighter V)
++# | * [#45573] League of Legends 8.12+ fails to start a game (anticheat engine,
hooking of syscall return instructions)
++# | * [#45650] chromium 32-bit sandbox expects different syscall thunks depending on
Windows version
++# |
++# | Modified files:
++# | * dlls/dbghelp/cpu_i386.c, dlls/kernel32/tests/loader.c,
dlls/krnl386.exe16/kernel.c,
++# | dlls/krnl386.exe16/kernel16_private.h, dlls/krnl386.exe16/ne_module.c,
dlls/krnl386.exe16/ne_segment.c,
++# | dlls/krnl386.exe16/task.c, dlls/krnl386.exe16/thunk.c,
dlls/krnl386.exe16/wowthunk.c, dlls/ntdll/actctx.c,
++# | dlls/ntdll/directory.c, dlls/ntdll/loader.c, dlls/ntdll/locale.c,
dlls/ntdll/ntdll_misc.h, dlls/ntdll/path.c,
++# | dlls/ntdll/process.c, dlls/ntdll/signal_i386.c, dlls/ntdll/tests/exception.c,
dlls/ntdll/thread.c,
++# | dlls/ntdll/unix/thread.c, dlls/ntdll/unix/unix_private.h,
dlls/ntdll/unix/virtual.c, dlls/ntdll/unixlib.h,
++# | dlls/system.drv16/system.c, dlls/toolhelp.dll16/toolhelp.c,
dlls/user.exe16/message.c, dlls/user.exe16/user.c,
++# | dlls/user.exe16/window.c, include/winternl.h, libs/wine/loader.c, server/mapping.c,
tools/winebuild/build.h,
++# | tools/winebuild/import.c, tools/winebuild/parser.c, tools/winebuild/relay.c,
tools/winebuild/res32.c,
++# | tools/winebuild/spec16.c, tools/winebuild/spec32.c, tools/winebuild/utils.c
++# |
++if test "$enable_winebuild_Fake_Dlls" -eq 1; then
++ patch_apply
winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
++ patch_apply
winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
++ patch_apply
winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
++ patch_apply
winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
++ patch_apply winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
++ patch_apply winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
++ patch_apply
winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
++ patch_apply
winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
++ patch_apply
winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
++ patch_apply
winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
++ patch_apply winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
++ (
++ printf '%s\n' '+ { "Michael Müller", "kernel32/tests:
Add basic tests for fake dlls.", 1 },';
++ printf '%s\n' '+ { "Sebastian Lackner", "krnl386.exe16:
Do not abuse WOW32Reserved field for 16-bit stack address.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "winebuild:
Generate syscall thunks for ntdll exports.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "winebuild: Use
multipass label system to generate fake dlls.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "winebuild: Add
stub functions in fake dlls.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "winebuild: Add
syscall thunks in fake dlls.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "winebuild: Fix
size of relocation information in fake dlls.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "winebuild: Try to
make sure RVA matches between fake and builtin DLLs.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "libs/wine: Use
same file alignment for fake and builtin DLLs.", 1 },';
++ printf '%s\n' '+ { "Michael Müller", "tools/winebuild:
Add syscall thunks for 64 bit.", 1 },';
++ printf '%s\n' '+ { "Paul Gofman", "ntdll: Call
NtOpenFile through syscall thunk.", 1 },';
++ ) >> "$patchlist"
++fi
++
+ # Patchset ntdll-Syscall_Emulation
+ # |
+ # | This patchset has the following (direct or indirect) dependencies:
+diff --git
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
+index 751b497da..684c28e16 100644
+---
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
++++
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
+@@ -1,4 +1,4 @@
+-From 1fec139d96f32869fc0c8d15219fff493d9951d8 Mon Sep 17 00:00:00 2001
++From e60eb454ecfb4c043a585c1ecd2970c92be1c664 Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)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 45d32399adf..b42cff8bcd4 100644
++index ffbc9fabb23..a633099877d 100644
+ --- a/dlls/ntdll/loader.c
+ +++ b/dlls/ntdll/loader.c
+ @@ -3810,6 +3810,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
+@@ -33,7 +33,7 @@ index 45d32399adf..b42cff8bcd4 100644
+
+ /******************************************************************
+ * LdrInitializeThunk (NTDLL.@)
+-@@ -3827,6 +3828,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
++@@ -3826,6 +3827,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
+ WINE_MODREF *wm;
+ LPCWSTR load_path =
NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
+
+@@ -43,19 +43,19 @@ index 45d32399adf..b42cff8bcd4 100644
+
+ if (process_detaching) return;
+ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
+-index be88d9bf3c7..84ab7991886 100644
++index 3be6342a945..85329be4f42 100644
+ --- a/dlls/ntdll/signal_i386.c
+ +++ b/dlls/ntdll/signal_i386.c
+-@@ -448,6 +448,8 @@ static ULONG first_ldt_entry = 32;
++@@ -444,6 +444,8 @@ struct stack_layout
+
+- static wine_signal_handler handlers[256];
++ 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) */
+-@@ -1159,7 +1161,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD
edi, DWORD esi,
++@@ -1127,7 +1129,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD
edi, DWORD esi,
+ {
+ context->Ebp = ebp;
+ context->Esp = (DWORD)&retaddr;
+@@ -78,7 +78,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 79d13a01a86..94eb6d1252d 100644
++index 49daa33ca58..17b5d40215a 100644
+ --- a/dlls/ntdll/thread.c
+ +++ b/dlls/ntdll/thread.c
+ @@ -173,6 +173,7 @@ int __cdecl __wine_dbg_output( const char *str )
+@@ -99,10 +99,10 @@ index 79d13a01a86..94eb6d1252d 100644
+ peb = teb->Peb;
+ peb->FastPebLock = &peb_lock;
+ diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
+-index b6458da61ad..a158ec20a6a 100644
++index d4b7a51a627..bdc87e4b9cf 100644
+ --- a/dlls/ntdll/unix/thread.c
+ +++ b/dlls/ntdll/unix/thread.c
+-@@ -83,7 +83,7 @@ static void pthread_exit_wrapper( int status )
++@@ -85,7 +85,7 @@ static void pthread_exit_wrapper( int status )
+ * init_threading
+ */
+ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T
*size, BOOL *suspend,
+@@ -111,7 +111,7 @@ index b6458da61ad..a158ec20a6a 100644
+ {
+ TEB *teb;
+ SIZE_T info_size;
+-@@ -95,6 +95,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZ
++@@ -97,6 +97,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZ
+ nb_threads = nb_threads_ptr;
+
+ teb = virtual_alloc_first_teb();
+@@ -120,10 +120,10 @@ index b6458da61ad..a158ec20a6a 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 880e3aacf33..6c7b961e95a 100644
++index 19104f0f5cc..bdf8bc99e3f 100644
+ --- a/dlls/ntdll/unix/unix_private.h
+ +++ b/dlls/ntdll/unix/unix_private.h
+-@@ -96,7 +96,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd )
DECLSPEC_HIDDE
++@@ -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;
+ extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy,
SIZE_T *size,
+ BOOL *suspend, unsigned int *cpus, BOOL *wow64,
+@@ -133,19 +133,19 @@ index 880e3aacf33..6c7b961e95a 100644
+ extern void CDECL DECLSPEC_NORETURN abort_thread( int status ) DECLSPEC_HIDDEN;
+ extern void CDECL DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN;
+ diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
+-index 83c9f3a163b..63728b1c071 100644
++index 6a751993421..4e39ed53786 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 31
+-+#define NTDLL_UNIXLIB_VERSION 32
++-#define NTDLL_UNIXLIB_VERSION 33
+++#define NTDLL_UNIXLIB_VERSION 34
+
+ struct unix_funcs
+ {
+-@@ -172,7 +172,7 @@ struct unix_funcs
++@@ -174,7 +174,7 @@ struct unix_funcs
+
+ /* thread/process functions */
+ TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZE_T *size,
+diff --git
a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
+index 25c315648..0861f99c0 100644
+---
a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
++++
b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch
+@@ -1,4 +1,4 @@
+-From 1bb20ff5903d8d5e81e8a2b7b22bf67b189b16ec Mon Sep 17 00:00:00 2001
++From 20661308a50202350a3a2887cbd558b1e931aad1 Mon Sep 17 00:00:00 2001
+ From: Sebastian Lackner <sebastian(a)fds-team.de>
+ Date: Sun, 6 Sep 2015 12:41:17 +0200
+ Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache in
+@@ -17,7 +17,7 @@ Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache
in
+ 9 files changed, 36 insertions(+), 5 deletions(-)
+
+ diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
+-index c4d78128758..3d6c8850086 100644
++index ce5c580bd54..279845ae830 100644
+ --- a/dlls/ntdll/ntdll.spec
+ +++ b/dlls/ntdll/ntdll.spec
+ @@ -1576,6 +1576,7 @@
+@@ -48,10 +48,10 @@ index 6fb86a68d6f..2f95e190963 100644
+ /***********************************************************************
+ * server_init_process
+ diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
+-index b5ee692024c..d8827b147df 100644
++index 618e3d6adb3..bdda739897b 100644
+ --- a/dlls/ntdll/unix/loader.c
+ +++ b/dlls/ntdll/unix/loader.c
+-@@ -1074,6 +1074,7 @@ static struct unix_funcs unix_funcs =
++@@ -1076,6 +1076,7 @@ static struct unix_funcs unix_funcs =
+ server_select,
+ server_wait,
+ server_send_fd,
+@@ -91,10 +91,10 @@ index fb3f98dd579..0754928cfe8 100644
+ /***********************************************************************
+ * server_get_unix_fd
+ diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
+-index a422fd825ed..880e3aacf33 100644
++index 03b92f9e912..19104f0f5cc 100644
+ --- a/dlls/ntdll/unix/unix_private.h
+ +++ b/dlls/ntdll/unix/unix_private.h
+-@@ -84,6 +84,7 @@ extern unsigned int CDECL server_select( const select_op_t *select_op,
data_size
++@@ -89,6 +89,7 @@ extern unsigned int CDECL server_select( const select_op_t *select_op,
data_size
+ extern unsigned int CDECL server_wait( const select_op_t *select_op, data_size_t size,
UINT flags,
+ const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN;
+ extern void CDECL server_send_fd( int fd ) DECLSPEC_HIDDEN;
+@@ -103,19 +103,19 @@ index a422fd825ed..880e3aacf33 100644
+ int *needs_close, enum server_fd_type *type,
+ unsigned int *options ) DECLSPEC_HIDDEN;
+ diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
+-index 58bdad19397..83c9f3a163b 100644
++index 017a0a71b3f..6a751993421 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 30
+-+#define NTDLL_UNIXLIB_VERSION 31
++-#define NTDLL_UNIXLIB_VERSION 32
+++#define NTDLL_UNIXLIB_VERSION 33
+
+ struct unix_funcs
+ {
+-@@ -187,6 +187,7 @@ struct unix_funcs
++@@ -189,6 +189,7 @@ struct unix_funcs
+ unsigned int (CDECL *server_wait)( const select_op_t *select_op, data_size_t size,
UINT flags,
+ const LARGE_INTEGER *timeout );
+ void (CDECL *server_send_fd)( int fd );
+diff --git a/staging/upstream-commit b/staging/upstream-commit
+index f51939b28..8b37e5310 100644
+--- a/staging/upstream-commit
++++ b/staging/upstream-commit
+@@ -1 +1 @@
+-3cc3b445752902e07231900befc296f74ad6576e
++17529582402ebe27ef975fc7dcb8353f4f95e629
diff --git a/wine-staging-5.10-ntdll-arm.patch b/wine-staging-5.10-ntdll-arm1.patch
similarity index 100%
rename from wine-staging-5.10-ntdll-arm.patch
rename to wine-staging-5.10-ntdll-arm1.patch
diff --git a/wine.spec b/wine.spec
index a2d6c1f..4308871 100644
--- a/wine.spec
+++ b/wine.spec
@@ -76,7 +76,8 @@ Source150: wine.appdata.xml
# wine bugs
Patch100: wine-staging-5.10-ntdll.patch
-Patch101: wine-staging-5.10-ntdll-arm.patch
+Patch101: wine-staging-5.10-ntdll-arm0.patch
+Patch102: wine-staging-5.10-ntdll-arm1.patch
# desktop dir
Source200: wine.menu
@@ -695,7 +696,8 @@ This package adds the opencl driver for wine.
# setup and apply wine-staging patches
gzip -dc %{SOURCE900} | tar -xf - --strip-components=1
%patch100 -p1 -b.ntdll
-%patch101 -p1 -b.ntdll-arm
+%patch101 -p1 -b.ntdll-arm0
+%patch102 -p1 -b.ntdll-arm1
patches/patchinstall.sh DESTDIR="`pwd`" --all
commit b6dc9f8efeed3ea5f12a5c992c7c2f08e1e2d9c2
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Thu Jun 11 08:47:39 2020 -0500
Wine-staging just fixed the ARM build failure so lets add the fix
diff --git a/wine-staging-5.10-ntdll-arm.patch b/wine-staging-5.10-ntdll-arm.patch
new file mode 100644
index 0000000..56a6f4f
--- /dev/null
+++ b/wine-staging-5.10-ntdll-arm.patch
@@ -0,0 +1,950 @@
+From 5306e1df11e772fe8125fcd5857e52cf1f83430b Mon Sep 17 00:00:00 2001
+From: Paul Gofman <gofmanp(a)gmail.com>
+Date: Thu, 11 Jun 2020 15:23:12 +0300
+Subject: [PATCH] Updated winebuild-Fake_Dlls patchset.
+
+Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49357
+---
+ ...-tests-Add-basic-tests-for-fake-dlls.patch | 8 +--
+ ...-not-abuse-WOW32Reserved-field-for-1.patch | 36 ++++++-------
+ ...ate-syscall-thunks-for-ntdll-exports.patch | 53 +++++++++++--------
+ ...ltipass-label-system-to-generate-fak.patch | 10 ++--
+ ...uild-Add-stub-functions-in-fake-dlls.patch | 36 ++++++-------
+ ...uild-Add-syscall-thunks-in-fake-dlls.patch | 8 +--
+ ...ze-of-relocation-information-in-fake.patch | 4 +-
+ ...-make-sure-RVA-matches-between-fake-.patch | 10 ++--
+ ...me-file-alignment-for-fake-and-built.patch | 8 +--
+ ...ebuild-Add-syscall-thunks-for-64-bit.patch | 39 ++++++--------
+ ...all-NtOpenFile-through-syscall-thunk.patch | 32 +++++------
+ 11 files changed, 123 insertions(+), 121 deletions(-)
+
+diff --git
a/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
b/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
+index ef056cfcf..21d69fd59 100644
+---
a/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
++++
b/patches/winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
+@@ -1,4 +1,4 @@
+-From de68d5c0e6bd728788bbec09100ea59802b8ff13 Mon Sep 17 00:00:00 2001
++From 8b88aa45856684e63786425f72886f2ac57b3630 Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Thu, 25 May 2017 07:02:46 +0200
+ Subject: [PATCH] kernel32/tests: Add basic tests for fake dlls.
+@@ -8,10 +8,10 @@ Subject: [PATCH] kernel32/tests: Add basic tests for fake dlls.
+ 1 file changed, 91 insertions(+)
+
+ diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
+-index 5474d543248..4e7a15970cb 100644
++index ef8c47c04f1a..efd5a25a432d 100644
+ --- a/dlls/kernel32/tests/loader.c
+ +++ b/dlls/kernel32/tests/loader.c
+-@@ -1535,6 +1535,96 @@ static void test_filenames(void)
++@@ -1572,6 +1572,96 @@ static void test_filenames(void)
+ DeleteFileA( long_path );
+ }
+
+@@ -108,7 +108,7 @@ index 5474d543248..4e7a15970cb 100644
+ /* Verify linking style of import descriptors */
+ static void test_ImportDescriptors(void)
+ {
+-@@ -3997,6 +4087,7 @@ START_TEST(loader)
++@@ -4094,6 +4184,7 @@ START_TEST(loader)
+ return;
+ }
+
+diff --git
a/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
b/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
+index 15aaa85df..ae98c2798 100644
+---
a/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
++++
b/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch
+@@ -1,4 +1,4 @@
+-From 25d08438aba3dee16c79ce3168a4f76f39816fad Mon Sep 17 00:00:00 2001
++From 7af81866f286e60f601d1c3f9bfe8592a794d21d Mon Sep 17 00:00:00 2001
+ From: Sebastian Lackner <sebastian(a)fds-team.de>
+ Date: Tue, 16 May 2017 04:37:52 +0200
+ Subject: [PATCH] krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit
+@@ -24,7 +24,7 @@ Subject: [PATCH] krnl386.exe16: Do not abuse WOW32Reserved field for
16-bit
+ 16 files changed, 78 insertions(+), 77 deletions(-)
+
+ diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c
+-index fd808a0d324..7d6723977a2 100644
++index fd808a0d3248..7d6723977a29 100644
+ --- a/dlls/dbghelp/cpu_i386.c
+ +++ b/dlls/dbghelp/cpu_i386.c
+ @@ -213,16 +213,16 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw,
STACKFRAME64 *frame,
+@@ -48,7 +48,7 @@ index fd808a0d324..7d6723977a2 100644
+ }
+ next_switch = p;
+ diff --git a/dlls/krnl386.exe16/kernel.c b/dlls/krnl386.exe16/kernel.c
+-index 07a57d0d937..89ea5c042e7 100644
++index 07a57d0d9372..89ea5c042e71 100644
+ --- a/dlls/krnl386.exe16/kernel.c
+ +++ b/dlls/krnl386.exe16/kernel.c
+ @@ -47,8 +47,8 @@ static void thread_attach(void)
+@@ -72,7 +72,7 @@ index 07a57d0d937..89ea5c042e7 100644
+ }
+
+ diff --git a/dlls/krnl386.exe16/kernel16_private.h
b/dlls/krnl386.exe16/kernel16_private.h
+-index f15934daa0e..9f939a9d5ba 100644
++index f15934daa0e4..9f939a9d5bac 100644
+ --- a/dlls/krnl386.exe16/kernel16_private.h
+ +++ b/dlls/krnl386.exe16/kernel16_private.h
+ @@ -169,7 +169,7 @@ extern THHOOK *pThhook DECLSPEC_HIDDEN;
+@@ -119,7 +119,7 @@ index f15934daa0e..9f939a9d5ba 100644
+
+ static inline struct kernel_thread_data *kernel_get_thread_data(void)
+ diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c
+-index f1e1a14dd67..c951a18f869 100644
++index f1e1a14dd679..c951a18f8699 100644
+ --- a/dlls/krnl386.exe16/ne_module.c
+ +++ b/dlls/krnl386.exe16/ne_module.c
+ @@ -1208,7 +1208,7 @@ DWORD NE_StartTask(void)
+@@ -143,7 +143,7 @@ index f1e1a14dd67..c951a18f869 100644
+ WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)&context );
+ ExitThread( LOWORD(context.Eax) );
+ diff --git a/dlls/krnl386.exe16/ne_segment.c b/dlls/krnl386.exe16/ne_segment.c
+-index aa886148029..70eb3360914 100644
++index aa8861480298..70eb33609144 100644
+ --- a/dlls/krnl386.exe16/ne_segment.c
+ +++ b/dlls/krnl386.exe16/ne_segment.c
+ @@ -370,9 +370,9 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
+@@ -209,7 +209,7 @@ index aa886148029..70eb3360914 100644
+ args[7] = HIWORD(dwReason);
+ args[6] = LOWORD(dwReason);
+ diff --git a/dlls/krnl386.exe16/task.c b/dlls/krnl386.exe16/task.c
+-index 39a60cb97a9..21de62c5a01 100644
++index 39a60cb97a94..21de62c5a015 100644
+ --- a/dlls/krnl386.exe16/task.c
+ +++ b/dlls/krnl386.exe16/task.c
+ @@ -624,7 +624,7 @@ void WINAPI InitTask16( CONTEXT *context )
+@@ -267,7 +267,7 @@ 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 e913a08f88c..ecc94371488 100644
++index e913a08f88cc..ecc94371488f 100644
+ --- a/dlls/krnl386.exe16/thunk.c
+ +++ b/dlls/krnl386.exe16/thunk.c
+ @@ -429,7 +429,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context )
+@@ -413,7 +413,7 @@ index e913a08f88c..ecc94371488 100644
+ if (OFFSETOF(frame32->frame16) > lpbuf[2])
+ {
+ diff --git a/dlls/krnl386.exe16/wowthunk.c b/dlls/krnl386.exe16/wowthunk.c
+-index 2dddbf93289..3a4b104a673 100644
++index 2dddbf932898..3a4b104a673f 100644
+ --- a/dlls/krnl386.exe16/wowthunk.c
+ +++ b/dlls/krnl386.exe16/wowthunk.c
+ @@ -127,7 +127,7 @@ static DWORD call16_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RE
+@@ -473,7 +473,7 @@ index 2dddbf93289..3a4b104a673 100644
+ }
+ }
+ diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
+-index 2928f314358..138f56b94eb 100644
++index ac34f86a5883..55f1e2ce4b23 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 )
+@@ -486,7 +486,7 @@ index 2928f314358..138f56b94eb 100644
+ return (void *)(ESP_sig(sigcontext) & ~3);
+ }
+ diff --git a/dlls/system.drv16/system.c b/dlls/system.drv16/system.c
+-index b6fd51c05f0..695ad7b6003 100644
++index b6fd51c05f01..695ad7b60039 100644
+ --- a/dlls/system.drv16/system.c
+ +++ b/dlls/system.drv16/system.c
+ @@ -70,7 +70,7 @@ static void CALLBACK SYSTEM_TimerTick( LPVOID arg, DWORD low, DWORD
high )
+@@ -499,7 +499,7 @@ index b6fd51c05f0..695ad7b6003 100644
+
+ WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)&context );
+ diff --git a/dlls/toolhelp.dll16/toolhelp.c b/dlls/toolhelp.dll16/toolhelp.c
+-index 578d1ae7fab..1077f0b0367 100644
++index 578d1ae7faba..1077f0b03672 100644
+ --- a/dlls/toolhelp.dll16/toolhelp.c
+ +++ b/dlls/toolhelp.dll16/toolhelp.c
+ @@ -491,8 +491,8 @@ BOOL16 WINAPI TaskNext16( TASKENTRY *lpte )
+@@ -523,7 +523,7 @@ index 578d1ae7fab..1077f0b0367 100644
+ WORD user = LoadLibrary16( "USER.EXE" );
+ WORD gdi = LoadLibrary16( "GDI.EXE" );
+ diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c
+-index e3ca3fd779d..fa9388ceaa1 100644
++index e3ca3fd779d3..fa9388ceaa11 100644
+ --- a/dlls/user.exe16/message.c
+ +++ b/dlls/user.exe16/message.c
+ @@ -240,11 +240,11 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg,
WPARAM16 wParam, LPA
+@@ -595,7 +595,7 @@ index e3ca3fd779d..fa9388ceaa1 100644
+
+ stack16->ds = GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
+ diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c
+-index 27b92793836..deec596f766 100644
++index 27b92793836a..deec596f7660 100644
+ --- a/dlls/user.exe16/user.c
+ +++ b/dlls/user.exe16/user.c
+ @@ -1394,7 +1394,7 @@ DWORD WINAPI GetTabbedTextExtent16( HDC16 hdc, LPCSTR lpstr, INT16
count,
+@@ -617,7 +617,7 @@ index 27b92793836..deec596f766 100644
+ int userPercent, gdiPercent;
+
+ diff --git a/dlls/user.exe16/window.c b/dlls/user.exe16/window.c
+-index bf86719325b..1f53bdc9540 100644
++index bf86719325b8..1f53bdc95402 100644
+ --- a/dlls/user.exe16/window.c
+ +++ b/dlls/user.exe16/window.c
+ @@ -456,7 +456,7 @@ HWND16 WINAPI GetParent16( HWND16 hwnd )
+@@ -630,10 +630,10 @@ 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 acbce20c212..68c1ae3fd82 100644
++index 87eb0d32926b..2d9f54b89d8c 100644
+ --- a/include/winternl.h
+ +++ b/include/winternl.h
+-@@ -362,7 +362,7 @@ typedef struct _TEB
++@@ -363,7 +363,7 @@ typedef struct _TEB
+ PVOID WOW32Reserved; /* 0c0/0100 */
+ ULONG CurrentLocale; /* 0c4/0108 */
+ ULONG FpSoftwareStatusRegister; /* 0c8/010c */
+@@ -643,7 +643,7 @@ index acbce20c212..68c1ae3fd82 100644
+ ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8/02c8 */
+ BYTE SpareBytes1[24]; /* 1bc/02e8 */
+ diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c
+-index 29d0a74c833..01bb97e02b4 100644
++index 29d0a74c833c..01bb97e02b4c 100644
+ --- a/tools/winebuild/relay.c
+ +++ b/tools/winebuild/relay.c
+ @@ -31,7 +31,7 @@
+diff --git
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
+index 547e27f8f..a0487f91b 100644
+---
a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
++++
b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch
+@@ -1,4 +1,4 @@
+-From 0c4d2573b123f2198f74292133b7a6eefa472620 Mon Sep 17 00:00:00 2001
++From d8ff827f7a94aee2bed89c620120af0a148ca81c Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Thu, 11 May 2017 05:32:55 +0200
+ Subject: [PATCH] winebuild: Generate syscall thunks for ntdll exports.
+@@ -8,7 +8,7 @@ Based on a patch by Erich E. Hoover.
+ dlls/ntdll/loader.c | 3 +
+ dlls/ntdll/signal_i386.c | 4 +-
+ dlls/ntdll/tests/exception.c | 2 +
+- dlls/ntdll/thread.c | 3 +-
++ dlls/ntdll/thread.c | 10 +++-
+ dlls/ntdll/unix/thread.c | 3 +-
+ dlls/ntdll/unix/unix_private.h | 2 +-
+ dlls/ntdll/unixlib.h | 4 +-
+@@ -19,13 +19,13 @@ Based on a patch by Erich E. Hoover.
+ tools/winebuild/spec16.c | 22 +------
+ tools/winebuild/spec32.c | 104 +++++++++++++++++++++++++++++++++
+ tools/winebuild/utils.c | 21 +++++++
+- 14 files changed, 214 insertions(+), 32 deletions(-)
++ 14 files changed, 221 insertions(+), 32 deletions(-)
+
+ diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
+-index 0c8f05285c4..26c540050dc 100644
++index 2553b0b9d397..cac6aae2f3dd 100644
+ --- a/dlls/ntdll/loader.c
+ +++ b/dlls/ntdll/loader.c
+-@@ -3810,6 +3810,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
++@@ -4021,6 +4021,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
+ return ret;
+ }
+
+@@ -33,7 +33,7 @@ index 0c8f05285c4..26c540050dc 100644
+
+ /******************************************************************
+ * LdrInitializeThunk (NTDLL.@)
+-@@ -3826,6 +3827,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
++@@ -4038,6 +4039,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
+ WINE_MODREF *wm;
+ LPCWSTR load_path =
NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
+
+@@ -43,7 +43,7 @@ index 0c8f05285c4..26c540050dc 100644
+
+ RtlEnterCriticalSection( &loader_section );
+ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
+-index 21cc1b3ead4..18be5693a7d 100644
++index 21cc1b3ead40..18be5693a7d2 100644
+ --- a/dlls/ntdll/signal_i386.c
+ +++ b/dlls/ntdll/signal_i386.c
+ @@ -346,6 +346,8 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 4,
+@@ -65,7 +65,7 @@ index 21cc1b3ead4..18be5693a7d 100644
+ }
+ return unix_funcs->NtGetContextThread( handle, context );
+ diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
+-index a5e6faa461a..51938bf84cc 100644
++index 1389a542cdee..54796476e25b 100644
+ --- a/dlls/ntdll/tests/exception.c
+ +++ b/dlls/ntdll/tests/exception.c
+ @@ -1643,6 +1643,8 @@ static void test_thread_context(void)
+@@ -78,18 +78,25 @@ 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 5a6809638ae..fa10cdf1062 100644
++index ff5fe9d6226a..e93498b27ea0 100644
+ --- a/dlls/ntdll/thread.c
+ +++ b/dlls/ntdll/thread.c
+-@@ -170,6 +170,7 @@ int __cdecl __wine_dbg_output( const char *str )
++@@ -220,6 +220,14 @@ int __cdecl __wine_dbg_output( const char *str )
+ return unix_funcs->dbg_output( str );
+ }
+
+++#if defined(__i386__) || defined(__x86_64__)
+ +extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
+++#else
+++void __wine_syscall_dispatcher( void )
+++{
+++ FIXME("Syscall dispatcher is not available for this architecture.\n");
+++}
+++#endif
+
+ /***********************************************************************
+ * thread_init
+-@@ -181,7 +182,7 @@ int __cdecl __wine_dbg_output( const char *str )
++@@ -231,7 +239,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,
+@@ -99,7 +106,7 @@ index 5a6809638ae..fa10cdf1062 100644
+ peb = teb->Peb;
+ peb->FastPebLock = &peb_lock;
+ diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
+-index 97b191e1a5b..2dbaa43e731 100644
++index 97b191e1a5b3..2dbaa43e731a 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,10 +127,10 @@ index 97b191e1a5b..2dbaa43e731 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 19dd216fc35..a1c48a52606 100644
++index 92a58417827b..33a551e947c2 100644
+ --- a/dlls/ntdll/unix/unix_private.h
+ +++ b/dlls/ntdll/unix/unix_private.h
+-@@ -107,7 +107,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd )
DECLSPEC_HIDDE
++@@ -108,7 +108,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,
+@@ -133,7 +140,7 @@ index 19dd216fc35..a1c48a52606 100644
+ 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 4c580c49d13..4f0080db03d 100644
++index 4c580c49d139..4f0080db03d9 100644
+ --- a/dlls/ntdll/unixlib.h
+ +++ b/dlls/ntdll/unixlib.h
+ @@ -28,7 +28,7 @@ struct ldt_copy;
+@@ -155,10 +162,10 @@ index 4c580c49d13..4f0080db03d 100644
+ 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 68c1ae3fd82..f2da9157aab 100644
++index 2d9f54b89d8c..0c15a0ee6c34 100644
+ --- a/include/winternl.h
+ +++ b/include/winternl.h
+-@@ -359,7 +359,7 @@ typedef struct _TEB
++@@ -360,7 +360,7 @@ typedef struct _TEB
+ PVOID CsrClientThread; /* 03c/0070 */
+ PVOID Win32ThreadInfo; /* 040/0078 */
+ ULONG Win32ClientInfo[31]; /* 044/0080 used
for user32 private data in Wine */
+@@ -168,7 +175,7 @@ index 68c1ae3fd82..f2da9157aab 100644
+ ULONG FpSoftwareStatusRegister; /* 0c8/010c */
+ PVOID SystemReserved1[54]; /* 0cc/0110 used
for krnl386.exe16 private data in Wine */
+ diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
+-index c162888a035..55d5b0b9dc2 100644
++index c162888a0356..55d5b0b9dc28 100644
+ --- a/tools/winebuild/build.h
+ +++ b/tools/winebuild/build.h
+ @@ -105,6 +105,7 @@ typedef struct
+@@ -216,7 +223,7 @@ index c162888a035..55d5b0b9dc2 100644
+
+ extern int byte_swapped;
+ diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
+-index 04ab433dd65..0c6bafed8e5 100644
++index 04ab433dd65a..0c6bafed8e54 100644
+ --- a/tools/winebuild/import.c
+ +++ b/tools/winebuild/import.c
+ @@ -531,6 +531,7 @@ static void check_undefined_forwards( DLLSPEC *spec )
+@@ -256,7 +263,7 @@ index 04ab433dd65..0c6bafed8e5 100644
+ }
+ }
+ diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
+-index 0f2b9c1e10a..74216f8bb6e 100644
++index 0f2b9c1e10ad..74216f8bb6e7 100644
+ --- a/tools/winebuild/parser.c
+ +++ b/tools/winebuild/parser.c
+ @@ -543,6 +543,24 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
+@@ -347,7 +354,7 @@ index 0f2b9c1e10a..74216f8bb6e 100644
+ }
+
+ diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c
+-index a52c03aaa6a..15ef9a3f893 100644
++index a52c03aaa6a7..15ef9a3f8930 100644
+ --- a/tools/winebuild/spec16.c
+ +++ b/tools/winebuild/spec16.c
+ @@ -495,27 +495,6 @@ static int relay_type_compare( const void *e1, const void *e2 )
+@@ -387,7 +394,7 @@ index a52c03aaa6a..15ef9a3f893 100644
+ entry_point->u.func.nb_args = 0;
+ assert( !spec->ordinals[0] );
+ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
+-index b1e20e0484d..22dd399cb2b 100644
++index b1e20e0484dc..22dd399cb2b4 100644
+ --- a/tools/winebuild/spec32.c
+ +++ b/tools/winebuild/spec32.c
+ @@ -374,6 +374,109 @@ static void output_relay_debug( DLLSPEC *spec )
+@@ -509,7 +516,7 @@ index b1e20e0484d..22dd399cb2b 100644
+ output_exports( spec );
+ output_imports( spec );
+ diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
+-index 2a1fc960926..07a579004ad 100644
++index 2a1fc960926b..07a579004adc 100644
+ --- a/tools/winebuild/utils.c
+ +++ b/tools/winebuild/utils.c
+ @@ -860,6 +860,7 @@ void free_dll_spec( DLLSPEC *spec )
+diff --git
a/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
b/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
+index 6c3984f8b..d4813799e 100644
+---
a/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
++++
b/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch
+@@ -1,4 +1,4 @@
+-From 15182deeb13e26abdb3067a77353354726ac82aa Mon Sep 17 00:00:00 2001
++From 344eb39bdfee74d4d826fa2f61a95736f0ee9823 Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Mon, 15 May 2017 02:05:49 +0200
+ Subject: [PATCH] winebuild: Use multipass label system to generate fake dlls.
+@@ -11,7 +11,7 @@ Subject: [PATCH] winebuild: Use multipass label system to generate fake
dlls.
+ 4 files changed, 181 insertions(+), 63 deletions(-)
+
+ diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
+-index 6ee847f908c..210324406a9 100644
++index 55d5b0b9dc28..8930df408d3b 100644
+ --- a/tools/winebuild/build.h
+ +++ b/tools/winebuild/build.h
+ @@ -343,6 +343,7 @@ extern size_t input_buffer_pos;
+@@ -35,7 +35,7 @@ index 6ee847f908c..210324406a9 100644
+ /* global variables */
+
+ diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
+-index bd55bb2fa5c..d9329019f8a 100644
++index bd55bb2fa5c4..d9329019f8a3 100644
+ --- a/tools/winebuild/res32.c
+ +++ b/tools/winebuild/res32.c
+ @@ -539,7 +539,6 @@ void output_bin_resources( DLLSPEC *spec, unsigned int start_rva )
+@@ -47,7 +47,7 @@ index bd55bb2fa5c..d9329019f8a 100644
+ /* output the resource directories */
+
+ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
+-index 22dd399cb2b..c38f1fe663c 100644
++index 22dd399cb2b4..c38f1fe663c7 100644
+ --- a/tools/winebuild/spec32.c
+ +++ b/tools/winebuild/spec32.c
+ @@ -844,11 +844,11 @@ void output_spec32_file( DLLSPEC *spec )
+@@ -279,7 +279,7 @@ index 22dd399cb2b..c38f1fe663c 100644
+ }
+
+ diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
+-index 7dc61a708db..64e1fa51455 100644
++index 07a579004adc..80dec6db29ea 100644
+ --- a/tools/winebuild/utils.c
+ +++ b/tools/winebuild/utils.c
+ @@ -34,6 +34,7 @@
+diff --git
a/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
b/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
+index f96d51aee..4ac05a314 100644
+--- a/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
++++ b/patches/winebuild-Fake_Dlls/0005-winebuild-Add-stub-functions-in-fake-dlls.patch
+@@ -1,4 +1,4 @@
+-From 167ad04157dd746ee9395afa9505fe00cc866f9b Mon Sep 17 00:00:00 2001
++From e5fc6ee60be5dd3b80af96dcbd81adb742ba7a5d Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Mon, 15 May 2017 16:27:56 +0200
+ Subject: [PATCH] winebuild: Add stub functions in fake dlls.
+@@ -14,10 +14,10 @@ Subject: [PATCH] winebuild: Add stub functions in fake dlls.
+ 7 files changed, 251 insertions(+), 15 deletions(-)
+
+ diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
+-index 926fa913866..902907329c0 100644
++index efd5a25a432d..182b61b731a2 100644
+ --- a/dlls/kernel32/tests/loader.c
+ +++ b/dlls/kernel32/tests/loader.c
+-@@ -1596,9 +1596,7 @@ static void test_FakeDLL(void)
++@@ -1597,9 +1597,7 @@ static void test_FakeDLL(void)
+ ok(ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError());
+
+ dir = RtlImageDirectoryEntryToData(ptr, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT,
&size);
+@@ -27,7 +27,7 @@ index 926fa913866..902907329c0 100644
+
+ names = RVAToAddr(dir->AddressOfNames, ptr);
+ ordinals = RVAToAddr(dir->AddressOfNameOrdinals, ptr);
+-@@ -1627,17 +1625,20 @@ todo_wine
++@@ -1628,17 +1626,20 @@ todo_wine
+ /* check position in memory */
+ dll_rva = (DWORD_PTR)dll_func - (DWORD_PTR)module;
+ map_rva = funcs[ordinals[i]];
+@@ -48,7 +48,7 @@ index 926fa913866..902907329c0 100644
+ ok(!memcmp(map_func, dll_func, 0x20), "%s: Function content does not
match!\n", func_name);
+
+ if (!strcmp(func_name, "NtSetEvent"))
+-@@ -1651,10 +1652,11 @@ todo_wine
++@@ -1652,10 +1653,11 @@ todo_wine
+ ok(event != NULL, "CreateEvent failed with error %u\n",
GetLastError());
+ pNtSetEvent(event, 0);
+ ok(WaitForSingleObject(event, 0) == WAIT_OBJECT_0, "Event was not
signaled\n");
+@@ -62,10 +62,10 @@ index 926fa913866..902907329c0 100644
+ CloseHandle(map);
+ CloseHandle(file);
+ diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
+-index 26c540050dc..09d3870c31a 100644
++index cac6aae2f3dd..51d989f30b45 100644
+ --- a/dlls/ntdll/loader.c
+ +++ b/dlls/ntdll/loader.c
+-@@ -3811,6 +3811,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
++@@ -4022,6 +4022,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
+ }
+
+ extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
+@@ -73,7 +73,7 @@ index 26c540050dc..09d3870c31a 100644
+
+ /******************************************************************
+ * LdrInitializeThunk (NTDLL.@)
+-@@ -3828,6 +3829,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
++@@ -4040,6 +4041,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry,
ULONG_PTR unknow
+ LPCWSTR load_path =
NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
+
+ NtCurrentTeb()->WOW32Reserved = __wine_syscall_dispatcher;
+@@ -82,12 +82,12 @@ index 26c540050dc..09d3870c31a 100644
+ if (process_detaching) return;
+
+ diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
+-index fa10cdf1062..4840f527e59 100644
++index e93498b27ea0..a14e3a12ae0c 100644
+ --- a/dlls/ntdll/thread.c
+ +++ b/dlls/ntdll/thread.c
+-@@ -172,6 +172,39 @@ int __cdecl __wine_dbg_output( const char *str )
+-
+- extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
++@@ -229,6 +229,39 @@ void __wine_syscall_dispatcher( void )
++ }
++ #endif
+
+ +void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
+ +{
+@@ -125,7 +125,7 @@ index fa10cdf1062..4840f527e59 100644
+ /***********************************************************************
+ * thread_init
+ *
+-@@ -183,6 +216,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
++@@ -240,6 +273,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 );
+@@ -134,10 +134,10 @@ index fa10cdf1062..4840f527e59 100644
+ peb = teb->Peb;
+ peb->FastPebLock = &peb_lock;
+ diff --git a/include/winternl.h b/include/winternl.h
+-index f2da9157aab..ce8021af503 100644
++index 0c15a0ee6c34..6da672e979e5 100644
+ --- a/include/winternl.h
+ +++ b/include/winternl.h
+-@@ -398,7 +398,7 @@ typedef struct _TEB
++@@ -399,7 +399,7 @@ typedef struct _TEB
+ PVOID Instrumentation[16]; /* f2c/16b8 */
+ PVOID WinSockData; /* f6c/1738 */
+ ULONG GdiBatchCount; /* f70/1740 */
+@@ -147,7 +147,7 @@ index f2da9157aab..ce8021af503 100644
+ PVOID ReservedForPerf; /* f7c/1750 */
+ PVOID ReservedForOle; /* f80/1758 */
+ diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
+-index 8930df408d3..44113bad28a 100644
++index 8930df408d3b..44113bad28af 100644
+ --- a/tools/winebuild/build.h
+ +++ b/tools/winebuild/build.h
+ @@ -358,6 +358,7 @@ extern void put_word( unsigned short val );
+@@ -159,7 +159,7 @@ index 8930df408d3..44113bad28a 100644
+ extern void align_output_rva( unsigned int file_align, unsigned int rva_align );
+ extern size_t label_pos( const char *name );
+ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
+-index c38f1fe663c..bf82ca497c0 100644
++index c38f1fe663c7..bf82ca497c0d 100644
+ --- a/tools/winebuild/spec32.c
+ +++ b/tools/winebuild/spec32.c
+ @@ -843,6 +843,163 @@ void output_spec32_file( DLLSPEC *spec )
+@@ -415,7 +415,7 @@ index c38f1fe663c..bf82ca497c0 100644
+ /* .reloc contents */
+ align_output_rva( file_align, section_align );
+ diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
+-index 80dec6db29e..d394a1382c6 100644
++index 80dec6db29ea..d394a1382c68 100644
+ --- a/tools/winebuild/utils.c
+ +++ b/tools/winebuild/utils.c
+ @@ -549,7 +549,7 @@ size_t output_buffer_size;
+diff --git
a/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
b/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
+index 5ae2b3deb..13f46d6b0 100644
+--- a/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
++++ b/patches/winebuild-Fake_Dlls/0006-winebuild-Add-syscall-thunks-in-fake-dlls.patch
+@@ -1,4 +1,4 @@
+-From 84a9f7b8192d7735108da2d7e81cf63faef97c13 Mon Sep 17 00:00:00 2001
++From fd72d405abba827ab5e2603551d48200aedad3ce Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Mon, 15 May 2017 17:56:48 +0200
+ Subject: [PATCH] winebuild: Add syscall thunks in fake dlls.
+@@ -9,10 +9,10 @@ Subject: [PATCH] winebuild: Add syscall thunks in fake dlls.
+ 2 files changed, 25 insertions(+), 3 deletions(-)
+
+ diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
+-index ec173c94a8e..a3bed8b310b 100644
++index 182b61b731a2..98369c7d508c 100644
+ --- a/dlls/kernel32/tests/loader.c
+ +++ b/dlls/kernel32/tests/loader.c
+-@@ -1602,7 +1602,6 @@ static void test_FakeDLL(void)
++@@ -1639,7 +1639,6 @@ static void test_FakeDLL(void)
+
+ /* check function content */
+ map_func = RVAToAddr(map_rva, ptr);
+@@ -21,7 +21,7 @@ index ec173c94a8e..a3bed8b310b 100644
+
+ if (!strcmp(func_name, "NtSetEvent"))
+ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
+-index bf82ca497c0..6968e41260f 100644
++index bf82ca497c0d..6968e41260f1 100644
+ --- a/tools/winebuild/spec32.c
+ +++ b/tools/winebuild/spec32.c
+ @@ -860,13 +860,36 @@ static void create_stub_exports_text( DLLSPEC *spec )
+diff --git
a/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
b/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
+index 92a7161de..3b3745ed6 100644
+---
a/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
++++
b/patches/winebuild-Fake_Dlls/0007-winebuild-Fix-size-of-relocation-information-in-fake.patch
+@@ -1,4 +1,4 @@
+-From d77c31b1567bfbde1ce4ceb526ad596d0be3e788 Mon Sep 17 00:00:00 2001
++From f92fc0572be02ce2eee2a9cbf60724372678a5af Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Thu, 25 May 2017 03:22:25 +0200
+ Subject: [PATCH] winebuild: Fix size of relocation information in fake dlls.
+@@ -8,7 +8,7 @@ Subject: [PATCH] winebuild: Fix size of relocation information in fake
dlls.
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
+-index 6968e41260f..f95b45b9a0d 100644
++index 6968e41260f1..f95b45b9a0d5 100644
+ --- a/tools/winebuild/spec32.c
+ +++ b/tools/winebuild/spec32.c
+ @@ -1238,8 +1238,8 @@ static void output_fake_module_pass( DLLSPEC *spec )
+diff --git
a/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
b/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
+index c4f1fb004..2cb4b7cf1 100644
+---
a/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
++++
b/patches/winebuild-Fake_Dlls/0008-winebuild-Try-to-make-sure-RVA-matches-between-fake-.patch
+@@ -1,4 +1,4 @@
+-From afa59bbabca36f306e9db4c1b080a250c4a919ea Mon Sep 17 00:00:00 2001
++From 59efee63a7442dfee4d9e76b11f651a11a4b523e Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Thu, 25 May 2017 21:46:27 +0200
+ Subject: [PATCH] winebuild: Try to make sure RVA matches between fake and
+@@ -11,10 +11,10 @@ Subject: [PATCH] winebuild: Try to make sure RVA matches between fake
and
+ 3 files changed, 26 insertions(+), 5 deletions(-)
+
+ diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
+-index a3bed8b310b..8b5a345b086 100644
++index 98369c7d508c..77e73b3ca37b 100644
+ --- a/dlls/kernel32/tests/loader.c
+ +++ b/dlls/kernel32/tests/loader.c
+-@@ -1589,7 +1589,6 @@ static void test_FakeDLL(void)
++@@ -1626,7 +1626,6 @@ static void test_FakeDLL(void)
+ /* check position in memory */
+ dll_rva = (DWORD_PTR)dll_func - (DWORD_PTR)module;
+ map_rva = funcs[ordinals[i]];
+@@ -23,7 +23,7 @@ index a3bed8b310b..8b5a345b086 100644
+ func_name, dll_rva, map_rva);
+
+ diff --git a/libs/wine/loader.c b/libs/wine/loader.c
+-index c3b59d90224..b6847ca77b3 100644
++index c3b59d902243..b6847ca77b31 100644
+ --- a/libs/wine/loader.c
+ +++ b/libs/wine/loader.c
+ @@ -335,8 +335,12 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
+@@ -54,7 +54,7 @@ index c3b59d90224..b6847ca77b3 100644
+
+ memcpy( sec->Name, ".text", sizeof(".text") );
+ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
+-index f95b45b9a0d..07d6eed05fc 100644
++index f95b45b9a0d5..07d6eed05fcc 100644
+ --- a/tools/winebuild/spec32.c
+ +++ b/tools/winebuild/spec32.c
+ @@ -381,14 +381,25 @@ static void output_relay_debug( DLLSPEC *spec )
+diff --git
a/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
b/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
+index e0ae33a59..9113beb5f 100644
+---
a/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
++++
b/patches/winebuild-Fake_Dlls/0009-libs-wine-Use-same-file-alignment-for-fake-and-built.patch
+@@ -1,4 +1,4 @@
+-From 29478273c4db90d209ac5afbdc1dd80add3d2c7e Mon Sep 17 00:00:00 2001
++From 370eccb19c65a8b02abfa31a76651ae533dda22f Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Thu, 25 May 2017 21:56:06 +0200
+ Subject: [PATCH] libs/wine: Use same file alignment for fake and builtin DLLs.
+@@ -9,10 +9,10 @@ Subject: [PATCH] libs/wine: Use same file alignment for fake and
builtin DLLs.
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+ diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
+-index 8b5a345b086..5373dc4efe1 100644
++index 77e73b3ca37b..1f525194ce73 100644
+ --- a/dlls/kernel32/tests/loader.c
+ +++ b/dlls/kernel32/tests/loader.c
+-@@ -1595,7 +1595,6 @@ static void test_FakeDLL(void)
++@@ -1632,7 +1632,6 @@ static void test_FakeDLL(void)
+ /* check position in file */
+ map_offset = (DWORD_PTR)RtlImageRvaToVa(RtlImageNtHeader(ptr), ptr,
map_rva, NULL) - (DWORD_PTR)ptr;
+ dll_offset = (DWORD_PTR)RtlImageRvaToVa(RtlImageNtHeader(module), module,
dll_rva, NULL) - (DWORD_PTR)module;
+@@ -21,7 +21,7 @@ index 8b5a345b086..5373dc4efe1 100644
+ func_name, map_offset, dll_offset);
+
+ diff --git a/libs/wine/loader.c b/libs/wine/loader.c
+-index b6847ca77b3..4597a6cb324 100644
++index b6847ca77b31..4597a6cb3243 100644
+ --- a/libs/wine/loader.c
+ +++ b/libs/wine/loader.c
+ @@ -398,7 +398,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
+diff --git
a/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
b/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
+index 6024e5a2f..e40a80148 100644
+---
a/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
++++
b/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch
+@@ -1,4 +1,4 @@
+-From a5b4feebd008daab008f72567fe0001da619030e Mon Sep 17 00:00:00 2001
++From 6f1973aa2aee35139ae041e59d37a45ff22dc5bf Mon Sep 17 00:00:00 2001
+ From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael(a)fds-team.de>
+ Date: Thu, 7 Sep 2017 00:38:09 +0200
+ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
+@@ -7,18 +7,18 @@ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
+ dlls/kernel32/tests/loader.c | 7 +-
+ dlls/ntdll/unix/thread.c | 2 +-
+ dlls/ntdll/unix/unix_private.h | 2 +-
+- dlls/ntdll/unix/virtual.c | 12 +-
++ dlls/ntdll/unix/virtual.c | 11 +-
+ libs/wine/loader.c | 4 +
+ server/mapping.c | 6 +-
+ tools/winebuild/parser.c | 2 +-
+ tools/winebuild/spec32.c | 285 ++++++++++++++++++++++++++++++++-
+- 8 files changed, 306 insertions(+), 14 deletions(-)
++ 8 files changed, 305 insertions(+), 14 deletions(-)
+
+ diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
+-index 95939ba6bde..ae5462f6e55 100644
++index 1f525194ce73..21af7b4ce7a4 100644
+ --- a/dlls/kernel32/tests/loader.c
+ +++ b/dlls/kernel32/tests/loader.c
+-@@ -1573,7 +1573,7 @@ static void test_filenames(void)
++@@ -1574,7 +1574,7 @@ static void test_filenames(void)
+
+ static void test_FakeDLL(void)
+ {
+@@ -27,7 +27,7 @@ index 95939ba6bde..ae5462f6e55 100644
+ NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL;
+ IMAGE_EXPORT_DIRECTORY *dir;
+ HMODULE module = GetModuleHandleA("ntdll.dll");
+-@@ -1615,8 +1615,13 @@ static void test_FakeDLL(void)
++@@ -1616,8 +1616,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,7 +42,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/unix/thread.c b/dlls/ntdll/unix/thread.c
+-index 2dbaa43e731..e1da90222d3 100644
++index 2dbaa43e731a..e1da90222d38 100644
+ --- a/dlls/ntdll/unix/thread.c
+ +++ b/dlls/ntdll/unix/thread.c
+ @@ -110,7 +110,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy
**ldt_copy, SIZ
+@@ -55,10 +55,10 @@ index 2dbaa43e731..e1da90222d3 100644
+
+ if (size) *size = info_size;
+ diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
+-index a1c48a52606..9c9e5b80b0c 100644
++index 33a551e947c2..d06f366d3c6d 100644
+ --- a/dlls/ntdll/unix/unix_private.h
+ +++ b/dlls/ntdll/unix/unix_private.h
+-@@ -152,7 +152,7 @@ extern void virtual_init(void) DECLSPEC_HIDDEN;
++@@ -153,7 +153,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;
+@@ -68,10 +68,10 @@ index a1c48a52606..9c9e5b80b0c 100644
+ 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 660323d4dcc..a5e5cb8422d 100644
++index 9fb2ecd38ca3..ad11485d1cea 100644
+ --- a/dlls/ntdll/unix/virtual.c
+ +++ b/dlls/ntdll/unix/virtual.c
+-@@ -2588,14 +2588,14 @@ TEB *virtual_alloc_first_teb(void)
++@@ -2772,14 +2772,14 @@ TEB *virtual_alloc_first_teb(void)
+ TEB *teb;
+ PEB *peb;
+ NTSTATUS status;
+@@ -88,12 +88,7 @@ index 660323d4dcc..a5e5cb8422d 100644
+ if (status)
+ {
+ ERR( "wine: failed to map the shared user data: %08x\n", status );
+-@@ -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 );
+- }
+-
+-+extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
+-
++@@ -2977,7 +2977,7 @@ void virtual_clear_thread_stack( void *stack_end )
+ /***********************************************************************
+ * virtual_map_user_shared_data
+ */
+@@ -102,7 +97,7 @@ index 660323d4dcc..a5e5cb8422d 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};
+-@@ -2814,6 +2815,11 @@ void virtual_map_user_shared_data(void)
++@@ -3000,6 +3000,11 @@ void virtual_map_user_shared_data(void)
+ ERR( "failed to remap the process USD: %d\n", res );
+ exit(1);
+ }
+@@ -115,7 +110,7 @@ index 660323d4dcc..a5e5cb8422d 100644
+ NtClose( section );
+ }
+ diff --git a/libs/wine/loader.c b/libs/wine/loader.c
+-index 4597a6cb324..3d0d75e9c6d 100644
++index 4597a6cb3243..3d0d75e9c6d3 100644
+ --- a/libs/wine/loader.c
+ +++ b/libs/wine/loader.c
+ @@ -398,7 +398,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
+@@ -131,7 +126,7 @@ index 4597a6cb324..3d0d75e9c6d 100644
+ sec++;
+
+ diff --git a/server/mapping.c b/server/mapping.c
+-index 0941dd87c05..002f3215af2 100644
++index 0941dd87c05d..002f3215af2e 100644
+ --- a/server/mapping.c
+ +++ b/server/mapping.c
+ @@ -964,7 +964,11 @@ struct object *create_user_data_mapping( struct object *root, const
struct unico
+@@ -148,7 +143,7 @@ index 0941dd87c05..002f3215af2 100644
+ }
+
+ diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
+-index 74216f8bb6e..820516329a4 100644
++index 74216f8bb6e7..820516329a47 100644
+ --- a/tools/winebuild/parser.c
+ +++ b/tools/winebuild/parser.c
+ @@ -545,7 +545,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
+@@ -161,7 +156,7 @@ index 74216f8bb6e..820516329a4 100644
+ if (odp->flags & (FLAG_FORWARD | FLAG_REGISTER))
+ return 0;
+ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
+-index 07d6eed05fc..9cc4698d0d7 100644
++index 07d6eed05fcc..9cc4698d0d7d 100644
+ --- a/tools/winebuild/spec32.c
+ +++ b/tools/winebuild/spec32.c
+ @@ -375,11 +375,11 @@ static void output_relay_debug( DLLSPEC *spec )
+diff --git
a/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
b/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
+index 69ee26be8..c3e065b26 100644
+--- a/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
++++ b/patches/winebuild-Fake_Dlls/0011-ntdll-Call-NtOpenFile-through-syscall-thunk.patch
+@@ -1,4 +1,4 @@
+-From 659e192979eecfb59d1c1b26e8cea78c42300de5 Mon Sep 17 00:00:00 2001
++From feb53ed39179603391eff600ea59edc41407b238 Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <gofmanp(a)gmail.com>
+ Date: Fri, 3 Jan 2020 17:39:08 +0300
+ Subject: [PATCH] ntdll: Call NtOpenFile through syscall thunk.
+@@ -15,10 +15,10 @@ Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48410
+ 7 files changed, 16 insertions(+), 8 deletions(-)
+
+ diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
+-index 1ca794ae3e5..b3c13042adc 100644
++index a25cefa555ac..34ba0dc813c6 100644
+ --- a/dlls/ntdll/actctx.c
+ +++ b/dlls/ntdll/actctx.c
+-@@ -2892,7 +2892,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name
)
++@@ -2894,7 +2894,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name
)
+ attr.ObjectName = name;
+ attr.SecurityDescriptor = NULL;
+ attr.SecurityQualityOfService = NULL;
+@@ -27,7 +27,7 @@ index 1ca794ae3e5..b3c13042adc 100644
+ }
+
+ static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct
assembly_identity* ai,
+-@@ -3209,7 +3209,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct
assembly_identit
++@@ -3211,7 +3211,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct
assembly_identit
+ attr.SecurityDescriptor = NULL;
+ attr.SecurityQualityOfService = NULL;
+
+@@ -37,10 +37,10 @@ index 1ca794ae3e5..b3c13042adc 100644
+ {
+ sxs_ai = *ai;
+ diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
+-index d18df38f626..69607a4fed9 100644
++index 18428658a5b5..7a9de26ccb0c 100644
+ --- a/dlls/ntdll/directory.c
+ +++ b/dlls/ntdll/directory.c
+-@@ -2943,7 +2943,7 @@ NTSTATUS DIR_get_unix_cwd( char **cwd )
++@@ -3071,7 +3071,7 @@ NTSTATUS DIR_get_unix_cwd( char **cwd )
+ attr.SecurityDescriptor = NULL;
+ attr.SecurityQualityOfService = NULL;
+
+@@ -50,10 +50,10 @@ index d18df38f626..69607a4fed9 100644
+ RtlFreeUnicodeString( &dirW );
+ if (status != STATUS_SUCCESS) goto done;
+ diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
+-index 0b8c28a0651..e48cd84cffd 100644
++index 51d989f30b45..8f1653b0d626 100644
+ --- a/dlls/ntdll/loader.c
+ +++ b/dlls/ntdll/loader.c
+-@@ -2469,7 +2469,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name,
WINE_MODREF **pwm,
++@@ -2521,7 +2521,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name,
WINE_MODREF **pwm,
+ attr.ObjectName = nt_name;
+ attr.SecurityDescriptor = NULL;
+ attr.SecurityQualityOfService = NULL;
+@@ -63,10 +63,10 @@ index 0b8c28a0651..e48cd84cffd 100644
+ FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE
)))
+ {
+ diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c
+-index 0d0c1194d23..a1bf219ed0a 100644
++index 15ccdeb2e637..928edcb04e2c 100644
+ --- a/dlls/ntdll/locale.c
+ +++ b/dlls/ntdll/locale.c
+-@@ -661,7 +661,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
++@@ -660,7 +660,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
+ return STATUS_NO_MEMORY;
+ valueW.Length = NTDLL_swprintf( valueW.Buffer, pathfmtW, dir, name ) *
sizeof(WCHAR);
+ InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL );
+@@ -75,7 +75,7 @@ index 0d0c1194d23..a1bf219ed0a 100644
+ if (!status) TRACE( "found %s\n", debugstr_w( valueW.Buffer ));
+ RtlFreeUnicodeString( &valueW );
+ if (status != STATUS_OBJECT_NAME_NOT_FOUND && status !=
STATUS_OBJECT_PATH_NOT_FOUND) return status;
+-@@ -685,7 +685,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
++@@ -684,7 +684,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE
*file )
+ wcscat( valueW.Buffer, name );
+ valueW.Length = wcslen(valueW.Buffer) * sizeof(WCHAR);
+ InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL );
+@@ -85,10 +85,10 @@ index 0d0c1194d23..a1bf219ed0a 100644
+ }
+ RtlFreeUnicodeString( &valueW );
+ diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
+-index 2e791b92f73..f8170793185 100644
++index 9091d1ae8c77..f8e81ae49eaf 100644
+ --- a/dlls/ntdll/ntdll_misc.h
+ +++ b/dlls/ntdll/ntdll_misc.h
+-@@ -350,4 +350,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src,
size_t len )
++@@ -329,4 +329,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src,
size_t len )
+ while (len--) *dst++ = (unsigned char)*src++;
+ }
+
+@@ -102,7 +102,7 @@ index 2e791b92f73..f8170793185 100644
+ +
+ #endif
+ diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
+-index 32e1f951af5..71ae44dd498 100644
++index 32e1f951af5c..71ae44dd4988 100644
+ --- a/dlls/ntdll/path.c
+ +++ b/dlls/ntdll/path.c
+ @@ -1020,7 +1020,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*
dir)
+@@ -115,10 +115,10 @@ index 32e1f951af5..71ae44dd498 100644
+ if (nts != STATUS_SUCCESS) goto out;
+
+ diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
+-index 60ee39765bf..70dfe6f768a 100644
++index 884141da060c..32a1f5107f06 100644
+ --- a/dlls/ntdll/process.c
+ +++ b/dlls/ntdll/process.c
+-@@ -1281,7 +1281,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, ULONG
attributes,
++@@ -1357,7 +1357,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, ULONG
attributes,
+
+ memset( info, 0, sizeof(*info) );
+ InitializeObjectAttributes( &attr, path, attributes, 0, 0 );
diff --git a/wine.spec b/wine.spec
index cd74653..a2d6c1f 100644
--- a/wine.spec
+++ b/wine.spec
@@ -76,6 +76,7 @@ Source150: wine.appdata.xml
# wine bugs
Patch100: wine-staging-5.10-ntdll.patch
+Patch101: wine-staging-5.10-ntdll-arm.patch
# desktop dir
Source200: wine.menu
@@ -694,15 +695,9 @@ This package adds the opencl driver for wine.
# setup and apply wine-staging patches
gzip -dc %{SOURCE900} | tar -xf - --strip-components=1
%patch100 -p1 -b.ntdll
+%patch101 -p1 -b.ntdll-arm
-%ifarch %{arm} aarch64
-patches/patchinstall.sh DESTDIR="`pwd`" --all \
- -W ntdll-NtContinue \
- -W ntdll-Syscall_Emulation \
- -W winebuild-Fake_Dlls
-%else
patches/patchinstall.sh DESTDIR="`pwd`" --all
-%endif
# fix parallelized build
sed -i -e 's!^loader server: libs/port libs/wine tools.*!& include!'
Makefile.in
commit ed2472170e1a0d58cf40488140572c6a8b013023
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Thu Jun 11 08:30:55 2020 -0500
Apply wine-staging patch and disable a few patchsets on arm due to compile issues
diff --git a/wine-staging-5.10-ntdll.patch b/wine-staging-5.10-ntdll.patch
new file mode 100644
index 0000000..0ac49d8
--- /dev/null
+++ b/wine-staging-5.10-ntdll.patch
@@ -0,0 +1,497 @@
+From 044cb930662d61f401a5d1bdd7b8e75d59cea5ea Mon Sep 17 00:00:00 2001
+From: Paul Gofman <gofmanp(a)gmail.com>
+Date: Mon, 8 Jun 2020 15:33:10 +0300
+Subject: [PATCH] Updated ntdll-ForceBottomUpAlloc patchset.
+
+Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49326
+---
+ ...h-on-mmap-error-in-try_map_free_area.patch | 9 +-
+ ...XED_NOREPLACE-flag-in-try_map_free_a.patch | 10 +-
+ ...om-up-allocation-order-for-64-bit-ar.patch | 12 +-
+ ...tep-after-failed-map-attempt-in-try_.patch | 8 +-
+ ...rea-list-for-virtual-memory-allocati.patch | 163 +++++++++++-------
+ ...y-exclude-natively-mapped-areas-from.patch | 14 +-
+ 6 files changed, 126 insertions(+), 90 deletions(-)
+
+diff --git
a/patches/ntdll-ForceBottomUpAlloc/0001-ntdll-Stop-search-on-mmap-error-in-try_map_free_area.patch
b/patches/ntdll-ForceBottomUpAlloc/0001-ntdll-Stop-search-on-mmap-error-in-try_map_free_area.patch
+index 7aa2337e8..ecf750c59 100644
+---
a/patches/ntdll-ForceBottomUpAlloc/0001-ntdll-Stop-search-on-mmap-error-in-try_map_free_area.patch
++++
b/patches/ntdll-ForceBottomUpAlloc/0001-ntdll-Stop-search-on-mmap-error-in-try_map_free_area.patch
+@@ -1,7 +1,8 @@
+-From ca116113c19ee17d2e8283abe4edf27f76df2148 Mon Sep 17 00:00:00 2001
++From c0a24a86c70b3cf2bfe118cff4d9ab03efaa9689 Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <gofmanp(a)gmail.com>
+ Date: Thu, 9 Jan 2020 15:05:09 +0300
+-Subject: [PATCH] ntdll: Stop search on mmap() error in try_map_free_area().
++Subject: [PATCH 1/6] ntdll: Stop search on mmap() error in
++ try_map_free_area().
+
+ The anon mmap errors do not depend on start address hint. Ignoring them
+ makes the search take incredible time until it fails.
+@@ -10,10 +11,10 @@ makes the search take incredible time until it fails.
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+ diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+-index 0346d0d9753..c29f695d694 100644
++index b2725e3ae9a..5c2ecfab398 100644
+ --- a/dlls/ntdll/unix/virtual.c
+ +++ b/dlls/ntdll/unix/virtual.c
+-@@ -1016,8 +1016,14 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
++@@ -1063,8 +1063,14 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
+ return start;
+ TRACE( "Found free area is already mapped, start %p.\n", start );
+
+diff --git
a/patches/ntdll-ForceBottomUpAlloc/0002-ntdll-Use-MAP_FIXED_NOREPLACE-flag-in-try_map_free_a.patch
b/patches/ntdll-ForceBottomUpAlloc/0002-ntdll-Use-MAP_FIXED_NOREPLACE-flag-in-try_map_free_a.patch
+index 6672d646f..81bdde5a0 100644
+---
a/patches/ntdll-ForceBottomUpAlloc/0002-ntdll-Use-MAP_FIXED_NOREPLACE-flag-in-try_map_free_a.patch
++++
b/patches/ntdll-ForceBottomUpAlloc/0002-ntdll-Use-MAP_FIXED_NOREPLACE-flag-in-try_map_free_a.patch
+@@ -1,8 +1,8 @@
+-From b2c9894cd6a81eaa9f7dd4bce3f9cbfbec17d021 Mon Sep 17 00:00:00 2001
++From 68e035e381f5d53980a8bcd7c0798dfd4b4fbe95 Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <gofmanp(a)gmail.com>
+ Date: Thu, 16 Jan 2020 16:09:24 +0300
+-Subject: [PATCH] ntdll: Use MAP_FIXED_NOREPLACE flag in try_map_free_area() if
+- available.
++Subject: [PATCH 2/6] ntdll: Use MAP_FIXED_NOREPLACE flag in
++ try_map_free_area() if available.
+
+ Avoids actual mapping followed by unmapping back if the memory range is
+ already mapped.
+@@ -11,10 +11,10 @@ already mapped.
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+ diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+-index c29f695d694..8d3e25481ec 100644
++index 5c2ecfab398..93b5d99dadd 100644
+ --- a/dlls/ntdll/unix/virtual.c
+ +++ b/dlls/ntdll/unix/virtual.c
+-@@ -1008,22 +1008,28 @@ static struct wine_rb_entry *find_view_inside_range( void
**base_ptr, void **end
++@@ -1055,22 +1055,28 @@ static struct wine_rb_entry *find_view_inside_range( void
**base_ptr, void **end
+ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
+ void *start, size_t size, int unix_prot )
+ {
+diff --git
a/patches/ntdll-ForceBottomUpAlloc/0003-ntdll-Force-bottom-up-allocation-order-for-64-bit-ar.patch
b/patches/ntdll-ForceBottomUpAlloc/0003-ntdll-Force-bottom-up-allocation-order-for-64-bit-ar.patch
+index 44980f11a..279c8e3c2 100644
+---
a/patches/ntdll-ForceBottomUpAlloc/0003-ntdll-Force-bottom-up-allocation-order-for-64-bit-ar.patch
++++
b/patches/ntdll-ForceBottomUpAlloc/0003-ntdll-Force-bottom-up-allocation-order-for-64-bit-ar.patch
+@@ -1,7 +1,7 @@
+-From 9f7320fe58c85f1b53301c2c9a2a80fa8d4ed228 Mon Sep 17 00:00:00 2001
++From 25be7201abeb509db4b28b81914036bc0c00c2f9 Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <gofmanp(a)gmail.com>
+ Date: Mon, 25 Nov 2019 12:19:20 +0300
+-Subject: [PATCH] ntdll: Force bottom up allocation order for 64 bit arch
++Subject: [PATCH 3/6] ntdll: Force bottom up allocation order for 64 bit arch
+ unless top down is requested.
+
+ Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48175
+@@ -11,10 +11,10 @@ Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46568
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+ diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+-index 8d3e25481ec..dc20e827141 100644
++index 93b5d99dadd..87b33016b72 100644
+ --- a/dlls/ntdll/unix/virtual.c
+ +++ b/dlls/ntdll/unix/virtual.c
+-@@ -1715,13 +1715,19 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
++@@ -1775,13 +1775,19 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
+ }
+ else
+ {
+@@ -35,7 +35,7 @@ index 8d3e25481ec..dc20e827141 100644
+ if (mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc,
top_down ))
+ {
+ ptr = alloc.result;
+-@@ -1731,7 +1737,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base,
size_t size,
++@@ -1791,7 +1797,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base,
size_t size,
+ goto done;
+ }
+
+@@ -44,7 +44,7 @@ index 8d3e25481ec..dc20e827141 100644
+ {
+ if (!(ptr = map_free_area( address_space_start, alloc.limit, size,
+ top_down, get_unix_prot(vprot) )))
+-@@ -1740,6 +1746,8 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base,
size_t size,
++@@ -1800,6 +1806,8 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base,
size_t size,
+ goto done;
+ }
+
+diff --git
a/patches/ntdll-ForceBottomUpAlloc/0004-ntdll-Increase-step-after-failed-map-attempt-in-try_.patch
b/patches/ntdll-ForceBottomUpAlloc/0004-ntdll-Increase-step-after-failed-map-attempt-in-try_.patch
+index 9361f0938..0b5c7618a 100644
+---
a/patches/ntdll-ForceBottomUpAlloc/0004-ntdll-Increase-step-after-failed-map-attempt-in-try_.patch
++++
b/patches/ntdll-ForceBottomUpAlloc/0004-ntdll-Increase-step-after-failed-map-attempt-in-try_.patch
+@@ -1,7 +1,7 @@
+-From e521333684d1286fff7b6625515d13ad6f3fcba3 Mon Sep 17 00:00:00 2001
++From d74a5c586c00a879fa1182af72c15c154e5dd096 Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <gofmanp(a)gmail.com>
+ Date: Tue, 14 Jan 2020 21:39:23 +0300
+-Subject: [PATCH] ntdll: Increase step after failed map attempt in
++Subject: [PATCH 4/6] ntdll: Increase step after failed map attempt in
+ try_map_free_area().
+
+ ---
+@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Increase step after failed map attempt in
+ 1 file changed, 1 insertion(+)
+
+ diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+-index dc20e827141..720d45ecb9f 100644
++index 87b33016b72..5e79faaf6fc 100644
+ --- a/dlls/ntdll/unix/virtual.c
+ +++ b/dlls/ntdll/unix/virtual.c
+-@@ -1036,6 +1036,7 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
++@@ -1083,6 +1083,7 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
+ step == 0)
+ break;
+ start = (char *)start + step;
+diff --git
a/patches/ntdll-ForceBottomUpAlloc/0005-ntdll-Use-free-area-list-for-virtual-memory-allocati.patch
b/patches/ntdll-ForceBottomUpAlloc/0005-ntdll-Use-free-area-list-for-virtual-memory-allocati.patch
+index 569bf3e62..1f712ba10 100644
+---
a/patches/ntdll-ForceBottomUpAlloc/0005-ntdll-Use-free-area-list-for-virtual-memory-allocati.patch
++++
b/patches/ntdll-ForceBottomUpAlloc/0005-ntdll-Use-free-area-list-for-virtual-memory-allocati.patch
+@@ -1,17 +1,17 @@
+-From df7b650d5e17afa411024b88d1920d0910947a6b Mon Sep 17 00:00:00 2001
++From f14407ee5755b6482714a6232a4313bcd1531781 Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <pgofman(a)codeweavers.com>
+ Date: Tue, 14 Jan 2020 21:42:21 +0300
+-Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
++Subject: [PATCH 5/6] ntdll: Use free area list for virtual memory allocation.
+
+ ---
+- dlls/ntdll/unix/virtual.c | 318 ++++++++++++++++++++++++--------------
+- 1 file changed, 204 insertions(+), 114 deletions(-)
++ dlls/ntdll/unix/virtual.c | 348 +++++++++++++++++++++++++-------------
++ 1 file changed, 234 insertions(+), 114 deletions(-)
+
+ diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+-index 720d45ecb9f..e323f4290bf 100644
++index 5e79faaf6fc..7f194effcaa 100644
+ --- a/dlls/ntdll/unix/virtual.c
+ +++ b/dlls/ntdll/unix/virtual.c
+-@@ -192,7 +192,11 @@ static BYTE *pages_vprot;
++@@ -195,7 +195,11 @@ static BYTE *pages_vprot;
+ #endif
+
+ static struct file_view *view_block_start, *view_block_end, *next_free_view;
+@@ -23,7 +23,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ static void *preload_reserve_start;
+ static void *preload_reserve_end;
+ static BOOL use_locks;
+-@@ -528,13 +532,13 @@ static struct range_entry *free_ranges_lower_bound( void *addr )
++@@ -546,13 +550,13 @@ static struct range_entry *free_ranges_lower_bound( void *addr )
+ *
+ * Updates the free_ranges after a new view has been created.
+ */
+@@ -40,7 +40,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ /* free_ranges initial value is such that the view is either inside range or before
another one. */
+ assert( range != free_ranges_end );
+ assert( range->end > view_base || next != free_ranges_end );
+-@@ -545,7 +549,7 @@ static void free_ranges_insert_view( struct file_view *view )
++@@ -563,7 +567,7 @@ static void free_ranges_insert_view( struct file_view *view )
+ (range->end == view_base && next->base >= view_end))
+ {
+ /* on Win64, assert that it's correctly aligned so we're not going to
be in trouble later */
+@@ -49,7 +49,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ WARN( "range %p - %p is already mapped\n", view_base, view_end );
+ return;
+ }
+-@@ -585,6 +589,12 @@ static void free_ranges_insert_view( struct file_view *view )
++@@ -603,6 +607,12 @@ static void free_ranges_insert_view( struct file_view *view )
+ }
+ }
+
+@@ -62,7 +62,7 @@ index 720d45ecb9f..e323f4290bf 100644
+
+ /***********************************************************************
+ * free_ranges_remove_view
+-@@ -615,6 +625,7 @@ static void free_ranges_remove_view( struct file_view *view )
++@@ -633,6 +643,7 @@ static void free_ranges_remove_view( struct file_view *view )
+ return;
+ }
+ #endif
+@@ -70,7 +70,7 @@ index 720d45ecb9f..e323f4290bf 100644
+
+ /* free_ranges initial value is such that the view is either inside range or before
another one. */
+ assert( range != free_ranges_end );
+-@@ -961,44 +972,6 @@ static struct file_view *find_view_range( const void *addr, size_t
size )
++@@ -1008,44 +1019,6 @@ static struct file_view *find_view_range( const void *addr,
size_t size )
+ }
+
+
+@@ -115,7 +115,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ /***********************************************************************
+ * try_map_free_area
+ *
+-@@ -1042,65 +1015,11 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
++@@ -1089,65 +1062,11 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
+ return NULL;
+ }
+
+@@ -181,7 +181,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ */
+ static void *find_reserved_free_area( void *base, void *end, size_t size, int top_down
)
+ {
+-@@ -1314,8 +1233,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
++@@ -1361,8 +1280,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
+ {
+ if (!(view->protect & VPROT_SYSTEM)) unmap_area( view->base,
view->size );
+ set_page_vprot( view->base, view->size, 0 );
+@@ -191,7 +191,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ wine_rb_remove( &views_tree, &view->entry );
+ *(struct file_view **)view = next_free_view;
+ next_free_view = view;
+-@@ -1363,8 +1281,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void
*base, size_t siz
++@@ -1410,8 +1328,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void
*base, size_t siz
+ set_page_vprot( base, size, vprot );
+
+ wine_rb_put( &views_tree, view->base, &view->entry );
+@@ -201,7 +201,7 @@ index 720d45ecb9f..e323f4290bf 100644
+
+ *view_ret = view;
+
+-@@ -1596,6 +1513,7 @@ struct alloc_area
++@@ -1656,6 +1573,7 @@ struct alloc_area
+ int top_down;
+ void *limit;
+ void *result;
+@@ -209,7 +209,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ };
+
+ /***********************************************************************
+-@@ -1637,6 +1555,179 @@ static int CDECL alloc_reserved_area_callback( void *start,
SIZE_T size, void *a
++@@ -1697,6 +1615,212 @@ static int CDECL alloc_reserved_area_callback( void *start,
SIZE_T size, void *a
+ return 0;
+ }
+
+@@ -303,11 +303,62 @@ index 720d45ecb9f..e323f4290bf 100644
+ + return 0;
+ +}
+ +
+++static void *alloc_free_area_in_range(struct area_alloc_reserved *area, char *base,
char *end,
+++ size_t size, int top_down, int unix_prot)
+++{
+++ char *start;
+++
+++ TRACE("range %p-%p.\n", base, end);
+++
+++ if (base >= end) return NULL;
+++
+++ area->map_area_start = base;
+++ area->map_area_end = end;
+++
+++ if (top_down)
+++ {
+++ start = ROUND_ADDR( end - size, granularity_mask );
+++ if (start >= end || start < base)
+++ return NULL;
+++ }
+++ else
+++ {
+++ start = ROUND_ADDR( base + granularity_mask, granularity_mask );
+++ if (!start || start >= end || (char *)end - (char *)start < size)
+++ return NULL;
+++ }
+++
+++ mmap_enum_reserved_areas( alloc_area_in_reserved_or_between_callback, area,
top_down );
+++ if (area->result)
+++ return area->result;
+++
+++ if (top_down)
+++ {
+++ start = ROUND_ADDR( area->map_area_end - size, granularity_mask );
+++ if (start >= area->map_area_end || start < area->map_area_start)
+++ return NULL;
+++
+++ return try_map_free_area( area->map_area_start, start + size,
area->step,
+++ start, size, unix_prot );
+++ }
+++ else
+++ {
+++ start = ROUND_ADDR( area->map_area_start + granularity_mask,
granularity_mask );
+++ if (!start || start >= area->map_area_end
+++ || area->map_area_end - start < size)
+++ return NULL;
+++
+++ return try_map_free_area( start, area->map_area_end, area->step,
+++ start, size, unix_prot );
+++ }
+++}
+++
+ +static void *alloc_free_area(void *limit, size_t size, BOOL top_down, int unix_prot)
+ +{
+ + struct range_entry *range, *ranges_start, *ranges_end;
+++ char *reserve_start, *reserve_end;
+ + struct area_alloc_reserved area;
+-+ char *start, *base, *end;
+++ char *base, *end;
+ + int ranges_inc;
+ +
+ + TRACE("limit %p, size %p, top_down %#x.\n", limit, (void *)size,
top_down);
+@@ -331,6 +382,9 @@ index 720d45ecb9f..e323f4290bf 100644
+ + area.top_down = top_down;
+ + area.unix_prot = unix_prot;
+ +
+++ reserve_start = ROUND_ADDR((char *)preload_reserve_start, granularity_mask);
+++ reserve_end = ROUND_ADDR((char *)preload_reserve_end + granularity_mask,
granularity_mask);
+++
+ + for (range = ranges_start; range != ranges_end; range += ranges_inc)
+ + {
+ + base = range->base;
+@@ -340,48 +394,27 @@ index 720d45ecb9f..e323f4290bf 100644
+ +
+ + if (base < (char *)address_space_start) base = (char *)address_space_start;
+ + if (end > (char *)limit + granularity_mask + 1) end = (char *)limit +
granularity_mask + 1;
+-+ if (base >= end) continue;
+ +
+-+ area.map_area_start = base;
+-+ area.map_area_end = end;
+-+
+-+ if (top_down)
+-+ {
+-+ start = ROUND_ADDR( (char *)end - size, granularity_mask );
+-+ if (start >= end || start < base)
+-+ continue;
+-+ }
+-+ else
+++ if (reserve_end >= base)
+ + {
+-+ start = ROUND_ADDR( (char *)base + granularity_mask, granularity_mask );
+-+ if (!start || start >= end || (char *)end - (char *)start < size)
+-+ continue;
+++ if (reserve_end >= end)
+++ {
+++ if (reserve_start <= base) continue; /* no space in that area */
+++ if (reserve_start < end) end = reserve_start;
+++ }
+++ else if (reserve_start <= base) base = reserve_end;
+++ else
+++ {
+++ /* range is split in two by the preloader reservation, try first part
*/
+++ if ((area.result = alloc_free_area_in_range(&area, base,
reserve_start, size, top_down, unix_prot)))
+++ return area.result;
+++ /* then fall through to try second part */
+++ base = reserve_end;
+++ }
+ + }
+-+ mmap_enum_reserved_areas( alloc_area_in_reserved_or_between_callback,
&area, top_down );
+-+ if (area.result)
+-+ return area.result;
+ +
+-+ if (top_down)
+-+ {
+-+ start = ROUND_ADDR( area.map_area_end - size, granularity_mask );
+-+ if (start >= area.map_area_end || start < area.map_area_start)
+-+ continue;
+-+
+-+ if ((area.result = try_map_free_area( area.map_area_start, start + size,
area.step,
+-+ start, size, unix_prot )))
+-+ return area.result;
+-+ }
+-+ else
+-+ {
+-+ start = ROUND_ADDR( area.map_area_start + granularity_mask,
granularity_mask );
+-+ if (!start || start >= area.map_area_end
+-+ || area.map_area_end - start < size)
+-+ continue;
+-+
+-+ if ((area.result = try_map_free_area( start, area.map_area_end, area.step,
+-+ start, size, unix_prot )))
+-+ return area.result;
+-+ }
+++ if ((area.result = alloc_free_area_in_range(&area, base, end, size,
top_down, unix_prot)))
+++ return area.result;
+ + }
+ + return NULL;
+ +}
+@@ -389,7 +422,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ /***********************************************************************
+ * map_fixed_area
+ *
+-@@ -1722,11 +1813,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
++@@ -1782,11 +1906,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
+ alloc.size = size;
+ alloc.top_down = top_down;
+ alloc.limit = (void*)(get_zero_bits_64_mask( zero_bits_64 ) &
(UINT_PTR)user_space_limit);
+@@ -408,7 +441,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ }
+
+ if (mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc,
top_down ))
+-@@ -1738,15 +1833,6 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
++@@ -1798,15 +1926,6 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
+ goto done;
+ }
+
+@@ -424,7 +457,15 @@ index 720d45ecb9f..e323f4290bf 100644
+ view_size = size + granularity_mask + 1;
+
+ for (;;)
+-@@ -2466,10 +2552,14 @@ void virtual_init(void)
++@@ -2500,6 +2619,7 @@ void virtual_init(void)
++ if (preload_reserve_start)
++ address_space_start = min( address_space_start, preload_reserve_start
);
++ }
+++ TRACE("preload reserve %p-%p.\n", preload_reserve_start,
preload_reserve_end);
++ }
++
++ size = ROUND_SIZE( 0, sizeof(TEB) ) + max( MINSIGSTKSZ, 8192 );
++@@ -2528,8 +2648,8 @@ void virtual_init(void)
+ pages_vprot = (void *)((char *)alloc_views.base + 2 * view_block_size);
+ wine_rb_init( &views_tree, compare_view );
+
+@@ -434,13 +475,7 @@ index 720d45ecb9f..e323f4290bf 100644
+ + free_ranges[0].end = address_space_limit;
+ free_ranges_end = free_ranges + 1;
+
+-+ free_ranges_remove_range(ROUND_ADDR(preload_reserve_start, granularity_mask),
+-+ ROUND_ADDR((char *)preload_reserve_end + granularity_mask,
+-+ granularity_mask), preload_reserve_start);
+-+
+ /* make the DOS area accessible (except the low 64K) to hide bugs in broken apps
like Excel 2003 */
+- size = (char *)address_space_start - (char *)0x10000;
+- if (size && mmap_is_in_reserved_area( (void*)0x10000, size ) == 1)
+ --
+ 2.26.2
+
+diff --git
a/patches/ntdll-ForceBottomUpAlloc/0006-ntdll-Permanently-exclude-natively-mapped-areas-from.patch
b/patches/ntdll-ForceBottomUpAlloc/0006-ntdll-Permanently-exclude-natively-mapped-areas-from.patch
+index 8cf896f8a..9bb16bdfc 100644
+---
a/patches/ntdll-ForceBottomUpAlloc/0006-ntdll-Permanently-exclude-natively-mapped-areas-from.patch
++++
b/patches/ntdll-ForceBottomUpAlloc/0006-ntdll-Permanently-exclude-natively-mapped-areas-from.patch
+@@ -1,18 +1,18 @@
+-From 81a8c626f834f3b2195980e84e2f5fc0a5b1e0e6 Mon Sep 17 00:00:00 2001
++From ac8fd6b34fa269ce840566055cc1c0b6c023516e Mon Sep 17 00:00:00 2001
+ From: Paul Gofman <pgofman(a)codeweavers.com>
+ Date: Tue, 2 Jun 2020 21:06:33 +0300
+-Subject: [PATCH] ntdll: Permanently exclude natively mapped areas from free
+- areas list.
++Subject: [PATCH 6/6] ntdll: Permanently exclude natively mapped areas from
++ free areas list.
+
+ ---
+ dlls/ntdll/unix/virtual.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+ diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+-index e323f4290bf..778f5d8c3b8 100644
++index 7f194effcaa..0e2e20396f3 100644
+ --- a/dlls/ntdll/unix/virtual.c
+ +++ b/dlls/ntdll/unix/virtual.c
+-@@ -123,6 +123,9 @@ static const BYTE VIRTUAL_Win32Flags[16] =
++@@ -124,6 +124,9 @@ static const BYTE VIRTUAL_Win32Flags[16] =
+
+ static struct wine_rb_tree views_tree;
+
+@@ -22,7 +22,7 @@ index e323f4290bf..778f5d8c3b8 100644
+ static RTL_CRITICAL_SECTION csVirtual;
+ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
+ {
+-@@ -1004,6 +1007,13 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
++@@ -1051,6 +1054,13 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t
step,
+ if (ptr != (void *)-1)
+ munmap( ptr, size );
+
+@@ -36,7 +36,7 @@ index e323f4290bf..778f5d8c3b8 100644
+ if ((step > 0 && (char *)end - (char *)start < step) ||
+ (step < 0 && (char *)start - (char *)base < -step) ||
+ step == 0)
+-@@ -1817,9 +1827,24 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
++@@ -1910,9 +1920,24 @@ static NTSTATUS map_view( struct file_view **view_ret, void
*base, size_t size,
+
+ if (is_win64 || zero_bits_64)
+ {
diff --git a/wine.spec b/wine.spec
index 5d030b2..cd74653 100644
--- a/wine.spec
+++ b/wine.spec
@@ -75,6 +75,7 @@ Source109: wine-oleview.desktop
Source150: wine.appdata.xml
# wine bugs
+Patch100: wine-staging-5.10-ntdll.patch
# desktop dir
Source200: wine.menu
@@ -692,8 +693,16 @@ This package adds the opencl driver for wine.
%if 0%{?wine_staging}
# setup and apply wine-staging patches
gzip -dc %{SOURCE900} | tar -xf - --strip-components=1
+%patch100 -p1 -b.ntdll
+%ifarch %{arm} aarch64
+patches/patchinstall.sh DESTDIR="`pwd`" --all \
+ -W ntdll-NtContinue \
+ -W ntdll-Syscall_Emulation \
+ -W winebuild-Fake_Dlls
+%else
patches/patchinstall.sh DESTDIR="`pwd`" --all
+%endif
# fix parallelized build
sed -i -e 's!^loader server: libs/port libs/wine tools.*!& include!'
Makefile.in
commit 72dcd1b7ad63b94a947ae3d1d341ef752cf59dbf
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Wed Jun 10 16:29:09 2020 -0500
Fix broken macro
diff --git a/wine.spec b/wine.spec
index 9464feb..5d030b2 100644
--- a/wine.spec
+++ b/wine.spec
@@ -719,6 +719,7 @@ export CC="/usr/bin/clang"
#
https://bugzilla.redhat.com/show_bug.cgi?id=1658311
export CFLAGS="`echo $CFLAGS | sed -e 's/-fstack-clash-protection//'`"
%endif
+%endif
%configure \
--sysconfdir=%{_sysconfdir}/wine \
commit 6a3375aed7da5016389cab93d28717377e09d9f0
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Wed Jun 10 16:27:36 2020 -0500
Re order macro to work with older aarch64 rules
diff --git a/wine.spec b/wine.spec
index b8c8f1b..9464feb 100644
--- a/wine.spec
+++ b/wine.spec
@@ -702,11 +702,6 @@ sed -i -e 's!^loader server: libs/port libs/wine tools.*!&
include!' Makefile.in
# 0%%{?wine_staging}
%build
-%if 0%{?fedora} >= 33
-%ifarch aarch64
-%global toolchain clang
-%endif
-%endif
# disable fortify as it breaks wine
#
http://bugs.winehq.org/show_bug.cgi?id=24606
@@ -714,6 +709,9 @@ sed -i -e 's!^loader server: libs/port libs/wine tools.*!&
include!' Makefile.in
export CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'`
-Wno-error"
%ifarch aarch64
+%if 0%{?fedora} >= 33
+%global toolchain clang
+%else
# ARM64 now requires clang
#
https://source.winehq.org/git/wine.git/commit/8fb8cc03c3edb599dd98f369e14...
export CC="/usr/bin/clang"
commit 41fb9606e6f1c66e8ee0bab57dcadd9251b8a4a6
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Wed Jun 10 16:20:00 2020 -0500
Add new macro for toolchain based on comments from RHBZ#1844893
diff --git a/wine.spec b/wine.spec
index bb89e53..b8c8f1b 100644
--- a/wine.spec
+++ b/wine.spec
@@ -702,6 +702,11 @@ sed -i -e 's!^loader server: libs/port libs/wine tools.*!&
include!' Makefile.in
# 0%%{?wine_staging}
%build
+%if 0%{?fedora} >= 33
+%ifarch aarch64
+%global toolchain clang
+%endif
+%endif
# disable fortify as it breaks wine
#
http://bugs.winehq.org/show_bug.cgi?id=24606
commit 4a5b3c288356f8f5c567ddd533aa2aac7f7a6c26
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Sun Jun 7 15:39:15 2020 -0500
Update to 5.10
diff --git a/.gitignore b/.gitignore
index 967baf9..1b3c9bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-/wine-5.9.tar.xz
-/wine-5.9.tar.xz.sign
-/wine-staging-5.9.tar.gz
+/wine-5.10.tar.xz
+/wine-5.10.tar.xz.sign
+/wine-staging-5.10.tar.gz
diff --git a/sources b/sources
index 7f5d1eb..71a95ad 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (wine-5.9.tar.xz) =
edc6d55a275cf37430a62dc6d6d86bff6d5a434e708dbd99d245018db7f6a0abe39581a1d91eb947f204a45ac94cc5c931745169a3b63a2aecf8db277553b74b
-SHA512 (wine-5.9.tar.xz.sign) =
1a048d9e4229eb6391a8a48027af8c2511b5c921c70fb1c6a398570d5656c0747746d34d7d3458a7be68220d00130676ad97ddeaaee94023a63f9afeba833357
-SHA512 (wine-staging-5.9.tar.gz) =
8fcf448be21edc0ccf8afef75013298c8f1634b51cd4d927ee5a1d039552d7c29609f65f283519b6561d09eb6eeae91fa6db70b9e78e4fd8bb5318408b39fb33
+SHA512 (wine-5.10.tar.xz) =
669d6861525cd4ab000113e8d9c5e10822b62b293914542ee34a826696df66e1d2f09b09f576f714e4117e79e25d1fd0b2a06c57d29da0efa0bdfcb9fee59c60
+SHA512 (wine-5.10.tar.xz.sign) =
809c9d4d37440bc6beac0b6da9c69e81c055f3ea606261c21dd2e1ce02e71976f3fc3433e0bd87cc8431b5cd49cab9db01d4bf62bd23fe294ca7a5180adab7ee
+SHA512 (wine-staging-5.10.tar.gz) =
fca5ddb648ac45c242b9bd7ccb0980161bff1e3539aa1a116f1cceece9d3b4a3188c82bd93624f561653dda793ad16dc00a87c7ed0c38f19a93b538519ef806c
diff --git a/wine-5.8-kernel32.patch b/wine-5.8-kernel32.patch
deleted file mode 100644
index 4345b38..0000000
--- a/wine-5.8-kernel32.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 613389059006270fc89abdfb984c43e6fa742a9a Mon Sep 17 00:00:00 2001
-From: Alexandre Julliard <julliard(a)winehq.org>
-Date: Tue, 26 May 2020 12:26:31 +0200
-Subject: [PATCH] kernel32: Leave some more space for kernelbase.
-
-Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49208
-Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
----
- dlls/kernel32/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dlls/kernel32/Makefile.in b/dlls/kernel32/Makefile.in
-index b3877fe13b..d9b1ca575c 100644
---- a/dlls/kernel32/Makefile.in
-+++ b/dlls/kernel32/Makefile.in
-@@ -3,7 +3,7 @@ MODULE = kernel32.dll
- IMPORTLIB = kernel32
- IMPORTS = winecrt0 kernelbase ntdll
- EXTRALIBS = $(COREFOUNDATION_LIBS) $(POLL_LIBS) $(RT_LIBS)
--EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b400000
-+EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b600000
-
- C_SRCS = \
- actctx.c \
---
-2.20.1
-
diff --git a/wine.spec b/wine.spec
index ffb9fc9..bb89e53 100644
--- a/wine.spec
+++ b/wine.spec
@@ -32,7 +32,8 @@
# build with wine-staging patches, see:
https://github.com/wine-staging/wine-staging
%if 0%{?fedora}
%global wine_staging 1
-%endif # 0%{?fedora}
+%endif
+# 0%%{?fedora}
# binfmt macros for RHEL
%if 0%{?rhel} == 7
@@ -43,8 +44,8 @@
%endif
Name: wine
-Version: 5.9
-Release: 2%{?dist}
+Version: 5.10
+Release: 1%{?dist}
Summary: A compatibility layer for windows applications
License: LGPLv2+
@@ -74,8 +75,6 @@ Source109: wine-oleview.desktop
Source150: wine.appdata.xml
# wine bugs
-#
https://source.winehq.org/git/wine.git/commit/613389059006270fc89abdfb984...
-Patch100: wine-5.8-kernel32.patch
# desktop dir
Source200: wine.menu
@@ -185,7 +184,8 @@ BuildRequires: libappstream-glib
BuildRequires: gtk3-devel
BuildRequires: libattr-devel
BuildRequires: libva-devel
-%endif # 0%{?wine_staging}
+%endif
+# 0%%{?wine_staging}
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
BuildRequires: openal-soft-devel
@@ -432,9 +432,11 @@ BuildArch: noarch
# arial-fonts are available with wine-staging patchset, only.
%if 0%{?wine_staging}
Requires: wine-arial-fonts = %{version}-%{release}
-%else # 0%{?wine_staging}
+%else
+# 0%%{?wine_staging}
Obsoletes: wine-arial-fonts <= %{version}-%{release}
-%endif # 0%{?wine_staging}
+%endif
+# 0%%{?wine_staging}
Requires: wine-courier-fonts = %{version}-%{release}
Requires: wine-fixedsys-fonts = %{version}-%{release}
Requires: wine-small-fonts = %{version}-%{release}
@@ -445,10 +447,12 @@ Requires: wine-tahoma-fonts = %{version}-%{release}
# times-new-roman-fonts are available with wine_staging-patchset, only.
%if 0%{?wine_staging}
Requires: wine-times-new-roman-fonts = %{version}-%{release}
-%else # 0%{?wine_staging}
+%else
+# 0%%{?wine_staging}
Obsoletes: wine-times-new-roman-fonts <= %{version}-%{release}
Obsoletes: wine-times-new-roman-fonts-system <= %{version}-%{release}
-%endif # 0%{?wine_staging}
+%endif
+# 0%%{?wine_staging}
Requires: wine-symbol-fonts = %{version}-%{release}
Requires: wine-wingdings-fonts = %{version}-%{release}
# intermediate fix for #593140
@@ -468,7 +472,8 @@ Requires: fontpackages-filesystem
%description arial-fonts
%{summary}
-%endif # 0%{?wine_staging}
+%endif
+# 0%%{?wine_staging}
%package courier-fonts
Summary: Wine Courier font family
@@ -683,7 +688,6 @@ This package adds the opencl driver for wine.
%prep
%setup -q -n wine-%{version}
%patch511 -p1 -b.cjk
-%patch100 -p1 -b.kernel32
%if 0%{?wine_staging}
# setup and apply wine-staging patches
@@ -694,7 +698,8 @@ patches/patchinstall.sh DESTDIR="`pwd`" --all
# fix parallelized build
sed -i -e 's!^loader server: libs/port libs/wine tools.*!& include!'
Makefile.in
-%endif # 0%{?wine_staging}
+%endif
+# 0%%{?wine_staging}
%build
@@ -1273,9 +1278,11 @@ fi
%{_libdir}/wine/api-ms-win-core-libraryloader-l1-2-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-libraryloader-l1-2-1.%{winedll}
%{_libdir}/wine/api-ms-win-core-libraryloader-l1-2-2.%{winedll}
+%{_libdir}/wine/api-ms-win-core-libraryloader-l2-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-localization-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-localization-l1-2-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-localization-l1-2-1.%{winedll}
+%{_libdir}/wine/api-ms-win-core-localization-l1-2-2.%{winedll}
%{_libdir}/wine/api-ms-win-core-localization-l2-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-localization-obsolete-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-localization-obsolete-l1-2-0.%{winedll}
@@ -1285,6 +1292,7 @@ fi
%{_libdir}/wine/api-ms-win-core-memory-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-memory-l1-1-1.%{winedll}
%{_libdir}/wine/api-ms-win-core-memory-l1-1-2.%{winedll}
+%{_libdir}/wine/api-ms-win-core-memory-l1-1-4.%{winedll}
%{_libdir}/wine/api-ms-win-core-misc-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-namedpipe-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-core-namedpipe-l1-2-0.%{winedll}
@@ -1373,6 +1381,7 @@ fi
%{_libdir}/wine/api-ms-win-devices-query-l1-1-1.%{winedll}
%{_libdir}/wine/api-ms-win-downlevel-advapi32-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-downlevel-advapi32-l2-1-0.%{winedll}
+%{_libdir}/wine/api-ms-win-downlevel-kernel32-l2-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-downlevel-normaliz-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-downlevel-ole32-l1-1-0.%{winedll}
%{_libdir}/wine/api-ms-win-downlevel-shell32-l1-1-0.%{winedll}
@@ -1766,6 +1775,7 @@ fi
%{_libdir}/wine/ndis.%{winesys}
%{_libdir}/wine/netapi32.dll.so
%{_libdir}/wine/netcfgx.%{winedll}
+%{_libdir}/wine/netio.%{winesys}
%{_libdir}/wine/netprofm.%{winedll}
%{_libdir}/wine/netsh.%{wineexe}
%{_libdir}/wine/newdev.%{winedll}
@@ -2147,7 +2157,8 @@ fi
%files arial-fonts
%doc COPYING.LIB
%{_datadir}/wine/fonts/arial*
-%endif #0%{?wine_staging}
+%endif
+#0%%{?wine_staging}
%files courier-fonts
%doc COPYING.LIB
@@ -2312,6 +2323,9 @@ fi
%endif
%changelog
+* Sun Jun 07 2020 Michael Cronenworth <mike(a)cchtml.com> 5.10-1
+- version update
+
* Tue Jun 02 2020 Michael Cronenworth <mike(a)cchtml.com> 5.9-2
- drop typelibs from 32-bit devel package
- add patch for wine bug 49208