diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index 3c17359c..041052ba 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From e8fe190b8e6352987961e1da946d125b99309034 Mon Sep 17 00:00:00 2001 +From 7b59a735bf21a4db50669c360666191493767909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= 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 ec6f2d5c6a7..654a83c92f9 100644 +index 8f418ef09a9..30f089bd64f 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -28,6 +28,7 @@ @@ -20,7 +20,7 @@ index ec6f2d5c6a7..654a83c92f9 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -4207,6 +4208,79 @@ static void test_Wow64Transition(void) +@@ -4205,6 +4206,79 @@ static void test_Wow64Transition(void) debugstr_wn(name->SectionFileName.Buffer, name->SectionFileName.Length / sizeof(WCHAR))); } @@ -100,7 +100,7 @@ index ec6f2d5c6a7..654a83c92f9 100644 START_TEST(loader) { int argc; -@@ -4288,6 +4362,7 @@ START_TEST(loader) +@@ -4286,6 +4360,7 @@ START_TEST(loader) test_InMemoryOrderModuleList(); test_LoadPackagedLibrary(); test_wow64_redirection(); @@ -109,7 +109,7 @@ index ec6f2d5c6a7..654a83c92f9 100644 test_dll_file( "kernel32.dll" ); test_dll_file( "advapi32.dll" ); diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 851fdcf3535..ed169d7bced 100644 +index 714d3f17ff0..415fcbb1aa6 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -133,6 +133,9 @@ struct file_id @@ -156,7 +156,7 @@ index 851fdcf3535..ed169d7bced 100644 /************************************************************************* * get_modref * -@@ -1522,7 +1552,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name +@@ -1528,7 +1558,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 851fdcf3535..ed169d7bced 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -2214,6 +2249,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, +@@ -2226,6 +2261,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 851fdcf3535..ed169d7bced 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3896,6 +3932,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3908,6 +3944,7 @@ static void free_modref( WINE_MODREF *wm ) RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -185,15 +185,15 @@ index 851fdcf3535..ed169d7bced 100644 if (wm->ldr.InInitializationOrderLinks.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderLinks); -@@ -4276,6 +4313,7 @@ void loader_init( CONTEXT *context, void **entry ) +@@ -4263,6 +4300,7 @@ void loader_init( CONTEXT *context, void **entry ) ANSI_STRING ctrl_routine = RTL_CONSTANT_STRING( "CtrlRoutine" ); WINE_MODREF *kernel32; PEB *peb = NtCurrentTeb()->Peb; + unsigned int i; - NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation, - &meminfo, sizeof(meminfo), NULL ); -@@ -4294,6 +4332,10 @@ void loader_init( CONTEXT *context, void **entry ) + peb->LdrData = &ldr; + peb->FastPebLock = &peb_lock; +@@ -4278,6 +4316,10 @@ void loader_init( CONTEXT *context, void **entry ) RtlSetBits( peb->TlsBitmap, 0, NtCurrentTeb()->WowTebOffset ? WOW64_TLS_MAX_NUMBER : 1 ); RtlSetBits( peb->TlsBitmap, NTDLL_TLS_ERRNO, 1 ); diff --git a/staging/upstream-commit b/staging/upstream-commit index 08b80e73..2583a991 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -d81c4ce1ba700cca040afcf89c75c683b23e531d +ab28825aceec92775fd570fc3a42c154366eceea