Rebase against 6b816b8969576a931af25fe5cc32326f03bb7359.

This commit is contained in:
Alistair Leslie-Hughes
2022-12-06 11:42:36 +11:00
parent cc4bced66e
commit d269579b4b
5 changed files with 31 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
From f44bf16013c0dace490308af9ce17b3ff6082abf Mon Sep 17 00:00:00 2001
From 3bde485a0dfb5626b079eec3a92cedcbcafa5d40 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.
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
2 files changed, 117 insertions(+)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 4f1b11338a6..56cd5a88e20 100644
index 365f4465fc7..aca2b0f24cb 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -30,6 +30,7 @@
@@ -20,7 +20,7 @@ index 4f1b11338a6..56cd5a88e20 100644
#include "wine/test.h"
#include "delayloadhandler.h"
@@ -4036,6 +4037,79 @@ static void test_Wow64Transition(void)
@@ -4056,6 +4057,79 @@ static void test_Wow64Transition(void)
debugstr_wn(name->SectionFileName.Buffer, name->SectionFileName.Length / sizeof(WCHAR)));
}
@@ -100,7 +100,7 @@ index 4f1b11338a6..56cd5a88e20 100644
START_TEST(loader)
{
int argc;
@@ -4108,6 +4182,7 @@ START_TEST(loader)
@@ -4128,6 +4202,7 @@ START_TEST(loader)
test_InMemoryOrderModuleList();
test_LoadPackagedLibrary();
test_wow64_redirection();
@@ -109,7 +109,7 @@ index 4f1b11338a6..56cd5a88e20 100644
test_dll_file( "kernel32.dll" );
test_dll_file( "advapi32.dll" );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 6dcf73295b0..8b9305ff5b6 100644
index b96cb862c93..aade2ab95d4 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -129,6 +129,9 @@ struct file_id
@@ -122,7 +122,7 @@ index 6dcf73295b0..8b9305ff5b6 100644
/* internal representation of loaded modules */
typedef struct _wine_modref
{
@@ -476,6 +479,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 6dcf73295b0..8b9305ff5b6 100644
/*************************************************************************
* get_modref
*
@@ -1352,7 +1382,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
@@ -1471,7 +1501,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 6dcf73295b0..8b9305ff5b6 100644
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -2032,6 +2067,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
@@ -2149,6 +2184,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 6dcf73295b0..8b9305ff5b6 100644
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3621,6 +3657,7 @@ static void free_modref( WINE_MODREF *wm )
@@ -3747,6 +3783,7 @@ static void free_modref( WINE_MODREF *wm )
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -185,15 +185,15 @@ index 6dcf73295b0..8b9305ff5b6 100644
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
@@ -3983,6 +4020,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
@@ -4113,6 +4150,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
if (!imports_fixup_done)
{
MEMORY_BASIC_INFORMATION meminfo;
+ int i;
ANSI_STRING func_name;
WINE_MODREF *kernel32;
PEB *peb = NtCurrentTeb()->Peb;
@@ -4000,6 +4038,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
@@ -4134,6 +4172,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. */
@@ -205,5 +205,5 @@ index 6dcf73295b0..8b9305ff5b6 100644
load_global_options();
version_init();
--
2.33.0
2.38.1