You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 3fb2a5d55e948670222170075f0054a2aabf8d7e.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From c933925dbe192c65d00bfa9bccc26bb7b21984fa Mon Sep 17 00:00:00 2001
|
||||
From eb96135501ef2822072e8f774868dd55ab3935ba Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 3 Apr 2017 05:30:27 +0200
|
||||
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
|
||||
@@ -109,10 +109,10 @@ index 365f4465fc7..aca2b0f24cb 100644
|
||||
test_dll_file( "kernel32.dll" );
|
||||
test_dll_file( "advapi32.dll" );
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 7661227e951..1087cf72d99 100644
|
||||
index cbd2fa2d384..693ba94dc71 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -128,6 +128,9 @@ struct file_id
|
||||
@@ -129,6 +129,9 @@ struct file_id
|
||||
BYTE ObjectId[16];
|
||||
};
|
||||
|
||||
@@ -122,7 +122,7 @@ index 7661227e951..1087cf72d99 100644
|
||||
/* internal representation of loaded modules */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
@@ -497,6 +500,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
@@ -498,6 +501,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ index 7661227e951..1087cf72d99 100644
|
||||
/*************************************************************************
|
||||
* get_modref
|
||||
*
|
||||
@@ -1476,7 +1506,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
@@ -1477,7 +1507,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
&wm->ldr.InLoadOrderLinks);
|
||||
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
|
||||
&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -169,7 +169,7 @@ index 7661227e951..1087cf72d99 100644
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
@@ -2154,6 +2189,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
@@ -2155,6 +2190,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
/* the module has only be inserted in the load & memory order lists */
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -177,7 +177,7 @@ index 7661227e951..1087cf72d99 100644
|
||||
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
@@ -3749,6 +3785,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
@@ -3796,6 +3832,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -185,7 +185,7 @@ index 7661227e951..1087cf72d99 100644
|
||||
if (wm->ldr.InInitializationOrderLinks.Flink)
|
||||
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
|
||||
|
||||
@@ -4117,6 +4154,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
@@ -4167,6 +4204,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
ANSI_STRING ctrl_routine = RTL_CONSTANT_STRING( "CtrlRoutine" );
|
||||
WINE_MODREF *kernel32;
|
||||
PEB *peb = NtCurrentTeb()->Peb;
|
||||
@@ -193,9 +193,9 @@ index 7661227e951..1087cf72d99 100644
|
||||
|
||||
NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation,
|
||||
&meminfo, sizeof(meminfo), NULL );
|
||||
@@ -4135,6 +4173,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
sizeof(peb->TlsExpansionBitmapBits) * 8 );
|
||||
RtlSetBits( peb->TlsBitmap, 0, 1 ); /* TLS index 0 is reserved and should be initialized to NULL. */
|
||||
@@ -4184,6 +4222,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
/* TLS index 0 is always reserved, and wow64 reserves extra TLS entries */
|
||||
RtlSetBits( peb->TlsBitmap, 0, NtCurrentTeb()->WowTebOffset ? WOW64_TLS_MAX_NUMBER : 1 );
|
||||
|
||||
+ /* initialize hash table */
|
||||
+ for (i = 0; i < HASH_MAP_SIZE; i++)
|
||||
@@ -205,5 +205,5 @@ index 7661227e951..1087cf72d99 100644
|
||||
load_global_options();
|
||||
version_init();
|
||||
--
|
||||
2.39.0
|
||||
2.39.2
|
||||
|
||||
|
Reference in New Issue
Block a user