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 2ee75bf9ade3e90f10ffe4236c8c95d817402392.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 0f8b2bb82ce32a1b5d384a6b1c970145de6bad57 Mon Sep 17 00:00:00 2001
|
||||
From da42137e7187fddc47862f435f3f238c687dc109 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, 141 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index 33073820240..ab793b1e136 100644
|
||||
index ca6afcbe051..2b6f51d55ba 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -21,7 +21,7 @@ index 33073820240..ab793b1e136 100644
|
||||
#include "wine/test.h"
|
||||
#include "delayloadhandler.h"
|
||||
|
||||
@@ -3970,6 +3971,79 @@ static void test_LoadPackagedLibrary(void)
|
||||
@@ -3945,6 +3946,79 @@ static void test_LoadPackagedLibrary(void)
|
||||
h, GetLastError());
|
||||
}
|
||||
|
||||
@@ -101,19 +101,19 @@ index 33073820240..ab793b1e136 100644
|
||||
START_TEST(loader)
|
||||
{
|
||||
int argc;
|
||||
@@ -4042,6 +4116,7 @@ START_TEST(loader)
|
||||
@@ -4017,6 +4091,7 @@ START_TEST(loader)
|
||||
test_InMemoryOrderModuleList();
|
||||
test_LoadPackagedLibrary();
|
||||
test_wow64_redirection();
|
||||
+ test_HashLinks();
|
||||
test_dll_file( "ntdll.dll", FALSE );
|
||||
test_dll_file( "kernel32.dll", TRUE );
|
||||
test_dll_file( "advapi32.dll", FALSE );
|
||||
test_dll_file( "ntdll.dll" );
|
||||
test_dll_file( "kernel32.dll" );
|
||||
test_dll_file( "advapi32.dll" );
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index ccaae0a5a25..37ee3b2cf23 100644
|
||||
index 55588774b29..06f4571a008 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -123,6 +123,9 @@ struct file_id
|
||||
@@ -124,6 +124,9 @@ struct file_id
|
||||
BYTE ObjectId[16];
|
||||
};
|
||||
|
||||
@@ -123,7 +123,7 @@ index ccaae0a5a25..37ee3b2cf23 100644
|
||||
/* internal representation of loaded modules */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
@@ -462,6 +465,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
@@ -484,6 +487,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ index ccaae0a5a25..37ee3b2cf23 100644
|
||||
/*************************************************************************
|
||||
* get_modref
|
||||
*
|
||||
@@ -1203,7 +1252,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
@@ -1225,7 +1274,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 ccaae0a5a25..37ee3b2cf23 100644
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
@@ -1910,6 +1964,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
@@ -1956,6 +2010,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 ccaae0a5a25..37ee3b2cf23 100644
|
||||
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
@@ -3247,6 +3302,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
@@ -3330,6 +3385,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
{
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -205,7 +205,7 @@ index ccaae0a5a25..37ee3b2cf23 100644
|
||||
if (wm->ldr.InInitializationOrderLinks.Flink)
|
||||
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
|
||||
|
||||
@@ -3974,6 +4030,7 @@ static NTSTATUS process_init(void)
|
||||
@@ -4091,6 +4147,7 @@ static NTSTATUS process_init(void)
|
||||
INITIAL_TEB stack;
|
||||
TEB *teb = NtCurrentTeb();
|
||||
PEB *peb = teb->Peb;
|
||||
@@ -213,7 +213,7 @@ index ccaae0a5a25..37ee3b2cf23 100644
|
||||
|
||||
peb->LdrData = &ldr;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
@@ -4012,6 +4069,10 @@ static NTSTATUS process_init(void)
|
||||
@@ -4130,6 +4187,10 @@ static NTSTATUS process_init(void)
|
||||
load_global_options();
|
||||
version_init();
|
||||
|
||||
@@ -224,7 +224,7 @@ index ccaae0a5a25..37ee3b2cf23 100644
|
||||
/* setup the load callback and create ntdll modref */
|
||||
RtlInitUnicodeString( &nt_name, ntdllW );
|
||||
NtQueryVirtualMemory( GetCurrentProcess(), process_init, MemoryBasicInformation,
|
||||
@@ -4106,6 +4167,10 @@ static NTSTATUS process_init(void)
|
||||
@@ -4223,6 +4284,10 @@ static NTSTATUS process_init(void)
|
||||
teb->Tib.StackBase = stack.StackBase;
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
@@ -236,10 +236,10 @@ index ccaae0a5a25..37ee3b2cf23 100644
|
||||
}
|
||||
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index b4621827454..d5f87c642be 100644
|
||||
index 62395bbce38..2511fa37c05 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2678,8 +2678,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
@@ -2680,8 +2680,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
ULONG Flags;
|
||||
SHORT LoadCount;
|
||||
SHORT TlsIndex;
|
||||
|
Reference in New Issue
Block a user