Rebase against f52b33c63064aa59f48a9c10d624e3508da55b88.

This commit is contained in:
Zebediah Figura
2020-04-22 17:09:11 -05:00
parent 75637c26ea
commit 2c2eabb5c0
4 changed files with 14 additions and 549 deletions

View File

@@ -1,4 +1,4 @@
From c1c2b51e391501ebf09816dfd6783bc648a44c1c Mon Sep 17 00:00:00 2001
From 25bb10aa7f39e1586812802589a42c9cfa7d2513 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.
@@ -115,10 +115,10 @@ index 35c6b3c0996..17d742daaa7 100644
test_Loader();
}
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 0568be63ad8..004d31f9367 100644
index 04ea7ea121a..2a8b4b3ad97 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -118,6 +118,9 @@ static const char * const reason_names[] =
@@ -122,6 +122,9 @@ static const char * const reason_names[] =
static const WCHAR dllW[] = {'.','d','l','l',0};
@@ -128,7 +128,7 @@ index 0568be63ad8..004d31f9367 100644
/* internal representation of 32bit modules. per process. */
typedef struct _wine_modref
{
@@ -458,6 +461,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module )
@@ -462,6 +465,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module )
}
}
@@ -181,7 +181,7 @@ index 0568be63ad8..004d31f9367 100644
/*************************************************************************
* get_modref
*
@@ -1216,7 +1265,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
@@ -1227,7 +1276,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
&wm->ldr.InLoadOrderModuleList);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderModuleList);
@@ -194,7 +194,7 @@ index 0568be63ad8..004d31f9367 100644
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -2015,6 +2069,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
@@ -2030,6 +2084,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
/* the module has only been inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
@@ -202,7 +202,7 @@ index 0568be63ad8..004d31f9367 100644
/* FIXME: free the modref */
return status;
}
@@ -2565,6 +2620,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
@@ -2573,6 +2628,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
/* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
@@ -210,7 +210,7 @@ index 0568be63ad8..004d31f9367 100644
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3783,6 +3839,7 @@ static void free_modref( WINE_MODREF *wm )
@@ -3791,6 +3847,7 @@ static void free_modref( WINE_MODREF *wm )
{
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
@@ -218,7 +218,7 @@ index 0568be63ad8..004d31f9367 100644
if (wm->ldr.InInitializationOrderModuleList.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderModuleList);
@@ -4476,6 +4533,7 @@ void __wine_process_init(void)
@@ -4488,6 +4545,7 @@ void __wine_process_init(void)
SIZE_T info_size;
TEB *teb = thread_init();
PEB *peb = teb->Peb;
@@ -226,7 +226,7 @@ index 0568be63ad8..004d31f9367 100644
/* setup the server connection */
server_init_process();
@@ -4497,6 +4555,10 @@ void __wine_process_init(void)
@@ -4510,6 +4568,10 @@ void __wine_process_init(void)
load_global_options();
version_init();
@@ -236,8 +236,8 @@ index 0568be63ad8..004d31f9367 100644
+
/* setup the load callback and create ntdll modref */
RtlInitUnicodeString( &nt_name, ntdllW );
default_load_info.filename = &nt_name;
@@ -4571,5 +4633,8 @@ void __wine_process_init(void)
map_so_dll( &__wine_spec_nt_header, ntdll_module );
@@ -4586,5 +4648,8 @@ void __wine_process_init(void)
teb->Tib.StackLimit = stack.StackLimit;
teb->DeallocationStack = stack.DeallocationStack;