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 666f614f3f09211614024f87a238aa49c79f574a.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 9bf96d63c4815fd6f4480102be400517e9c8d387 Mon Sep 17 00:00:00 2001
|
||||
From 1bf1469697e4e7c6b3f3fd9918584016829aed8f 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.
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
|
||||
3 files changed, 140 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index 757a230ae15..466e5a444f4 100644
|
||||
index 3dee67d5a91..3623d9d99a1 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -21,7 +21,7 @@ index 757a230ae15..466e5a444f4 100644
|
||||
#include "wine/test.h"
|
||||
#include "delayloadhandler.h"
|
||||
|
||||
@@ -3970,6 +3971,79 @@ static void test_LoadPackagedLibrary(void)
|
||||
@@ -3957,6 +3958,79 @@ static void test_LoadPackagedLibrary(void)
|
||||
h, GetLastError());
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ index 757a230ae15..466e5a444f4 100644
|
||||
START_TEST(loader)
|
||||
{
|
||||
int argc;
|
||||
@@ -4042,6 +4116,7 @@ START_TEST(loader)
|
||||
@@ -4029,6 +4103,7 @@ START_TEST(loader)
|
||||
test_InMemoryOrderModuleList();
|
||||
test_LoadPackagedLibrary();
|
||||
test_wow64_redirection();
|
||||
@@ -110,10 +110,10 @@ index 757a230ae15..466e5a444f4 100644
|
||||
test_dll_file( "kernel32.dll", TRUE );
|
||||
test_dll_file( "advapi32.dll", TRUE );
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 6290cbcb4e6..9953746bdaa 100644
|
||||
index 2f110b23452..ee9b3b1c3ca 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -118,6 +118,9 @@ struct file_id
|
||||
@@ -122,6 +122,9 @@ struct file_id
|
||||
BYTE ObjectId[16];
|
||||
};
|
||||
|
||||
@@ -123,7 +123,7 @@ index 6290cbcb4e6..9953746bdaa 100644
|
||||
/* internal representation of loaded modules */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
@@ -457,6 +460,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
@@ -481,6 +484,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ index 6290cbcb4e6..9953746bdaa 100644
|
||||
/*************************************************************************
|
||||
* get_modref
|
||||
*
|
||||
@@ -1198,7 +1247,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
@@ -1222,7 +1271,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
&wm->ldr.InLoadOrderLinks);
|
||||
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
|
||||
&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -189,7 +189,7 @@ index 6290cbcb4e6..9953746bdaa 100644
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
@@ -1903,6 +1957,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
@@ -1953,6 +2007,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);
|
||||
@@ -197,7 +197,7 @@ index 6290cbcb4e6..9953746bdaa 100644
|
||||
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
@@ -3239,6 +3294,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
@@ -3303,6 +3358,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
{
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -205,7 +205,7 @@ index 6290cbcb4e6..9953746bdaa 100644
|
||||
if (wm->ldr.InInitializationOrderLinks.Flink)
|
||||
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
|
||||
|
||||
@@ -3908,6 +3964,7 @@ void __wine_process_init(void)
|
||||
@@ -4007,6 +4063,7 @@ static void process_init(void)
|
||||
INITIAL_TEB stack;
|
||||
TEB *teb = NtCurrentTeb();
|
||||
PEB *peb = teb->Peb;
|
||||
@@ -213,7 +213,7 @@ index 6290cbcb4e6..9953746bdaa 100644
|
||||
|
||||
peb->LdrData = &ldr;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
@@ -3946,6 +4003,10 @@ void __wine_process_init(void)
|
||||
@@ -4046,6 +4103,10 @@ static void process_init(void)
|
||||
load_global_options();
|
||||
version_init();
|
||||
|
||||
@@ -223,22 +223,22 @@ index 6290cbcb4e6..9953746bdaa 100644
|
||||
+
|
||||
/* setup the load callback and create ntdll modref */
|
||||
RtlInitUnicodeString( &nt_name, ntdllW );
|
||||
NtQueryVirtualMemory( GetCurrentProcess(), __wine_process_init, MemoryBasicInformation,
|
||||
@@ -4032,6 +4093,9 @@ void __wine_process_init(void)
|
||||
NtQueryVirtualMemory( GetCurrentProcess(), process_init, MemoryBasicInformation,
|
||||
@@ -4131,6 +4192,9 @@ static void process_init(void)
|
||||
teb->Tib.StackBase = stack.StackBase;
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
|
||||
+
|
||||
+ /* the windows version was not set yet when ntdll and kernel32 were loaded */
|
||||
+ recompute_hash_map();
|
||||
+
|
||||
unix_funcs->server_init_process_done( kernel32_start_process );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 8efdaf31193..2ed26e397c4 100644
|
||||
index dceed34340a..dca18cab8ff 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2672,8 +2672,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
@@ -2679,8 +2679,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
ULONG Flags;
|
||||
SHORT LoadCount;
|
||||
SHORT TlsIndex;
|
||||
@@ -249,5 +249,5 @@ index 8efdaf31193..2ed26e397c4 100644
|
||||
HANDLE ActivationContext;
|
||||
void* Lock;
|
||||
--
|
||||
2.27.0
|
||||
2.28.0
|
||||
|
||||
|
Reference in New Issue
Block a user