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 bc282905d9491b9f9fe4ae4b69a8ccdf99c5aaa8.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
From b1af584b5d5b8905bf4dd3ec6be9227e5221a744 Mon Sep 17 00:00:00 2001
|
||||
From 250b8699aa64096bb4b38d454c03b57afe91a619 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.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/loader.c | 76 ++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/loader.c | 65 ++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/loader.c | 64 ++++++++++++++++++++++++++++++
|
||||
include/winternl.h | 2 +-
|
||||
3 files changed, 142 insertions(+), 1 deletion(-)
|
||||
3 files changed, 141 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index 59965984a67..95f18fb71e3 100644
|
||||
@@ -115,10 +115,10 @@ index 59965984a67..95f18fb71e3 100644
|
||||
test_Loader();
|
||||
}
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index c90cdcc860b..63e1227cc55 100644
|
||||
index 42cdc628021..df8e0c69185 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -128,6 +128,9 @@ struct file_id
|
||||
@@ -121,6 +121,9 @@ struct file_id
|
||||
BYTE ObjectId[16];
|
||||
};
|
||||
|
||||
@@ -128,7 +128,7 @@ index c90cdcc860b..63e1227cc55 100644
|
||||
/* internal representation of loaded modules */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
@@ -467,6 +470,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
@@ -446,6 +449,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ index c90cdcc860b..63e1227cc55 100644
|
||||
/*************************************************************************
|
||||
* get_modref
|
||||
*
|
||||
@@ -1231,7 +1280,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
@@ -1188,7 +1237,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
&wm->ldr.InLoadOrderLinks);
|
||||
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
|
||||
&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -194,15 +194,7 @@ index c90cdcc860b..63e1227cc55 100644
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
@@ -1892,6 +1946,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.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
+ RemoveEntryList(&wm->ldr.HashLinks);
|
||||
/* FIXME: free the modref */
|
||||
return status;
|
||||
}
|
||||
@@ -2433,6 +2488,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
|
||||
@@ -1894,6 +1948,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);
|
||||
@@ -210,7 +202,7 @@ index c90cdcc860b..63e1227cc55 100644
|
||||
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
@@ -3652,6 +3708,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
@@ -3226,6 +3281,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
{
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -218,7 +210,7 @@ index c90cdcc860b..63e1227cc55 100644
|
||||
if (wm->ldr.InInitializationOrderLinks.Flink)
|
||||
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
|
||||
|
||||
@@ -4372,6 +4429,7 @@ void __wine_process_init(void)
|
||||
@@ -3945,6 +4001,7 @@ void __wine_process_init(void)
|
||||
SIZE_T info_size;
|
||||
TEB *teb;
|
||||
PEB *peb;
|
||||
@@ -226,7 +218,7 @@ index c90cdcc860b..63e1227cc55 100644
|
||||
|
||||
if (!unix_funcs) load_ntdll_so( ntdll_module, &__wine_spec_nt_header );
|
||||
|
||||
@@ -4388,6 +4446,10 @@ void __wine_process_init(void)
|
||||
@@ -3961,6 +4018,10 @@ void __wine_process_init(void)
|
||||
load_global_options();
|
||||
version_init();
|
||||
|
||||
@@ -237,7 +229,7 @@ index c90cdcc860b..63e1227cc55 100644
|
||||
/* setup the load callback and create ntdll modref */
|
||||
RtlInitUnicodeString( &nt_name, ntdllW );
|
||||
status = build_so_dll_module( params->DllPath.Buffer, &nt_name, ntdll_module, 0, &wm );
|
||||
@@ -4463,6 +4525,9 @@ void __wine_process_init(void)
|
||||
@@ -4034,6 +4095,9 @@ void __wine_process_init(void)
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
|
||||
|
Reference in New Issue
Block a user