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
Added patch to set ldr.EntryPoint for main executable (fixes wine bug 33034).
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 63a62bb5903e62f161b7e5972662220c606d702f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 2 Aug 2014 18:27:20 +0200
|
||||
Subject: ntdll: Set ldr.EntryPoint for main executable.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 79aa341..c869d8f 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -921,9 +921,10 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename )
|
||||
else p = wm->ldr.FullDllName.Buffer;
|
||||
RtlInitUnicodeString( &wm->ldr.BaseDllName, p );
|
||||
|
||||
- if ((nt->FileHeader.Characteristics & IMAGE_FILE_DLL) && !is_dll_native_subsystem( hModule, nt, p ))
|
||||
+ if (!(nt->FileHeader.Characteristics & IMAGE_FILE_DLL) || !is_dll_native_subsystem( hModule, nt, p ))
|
||||
{
|
||||
- wm->ldr.Flags |= LDR_IMAGE_IS_DLL;
|
||||
+ if (nt->FileHeader.Characteristics & IMAGE_FILE_DLL)
|
||||
+ wm->ldr.Flags |= LDR_IMAGE_IS_DLL;
|
||||
if (nt->OptionalHeader.AddressOfEntryPoint)
|
||||
wm->ldr.EntryPoint = (char *)hModule + nt->OptionalHeader.AddressOfEntryPoint;
|
||||
}
|
||||
@@ -1049,7 +1050,7 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
|
||||
|
||||
if (wm->ldr.Flags & LDR_DONT_RESOLVE_REFS) return STATUS_SUCCESS;
|
||||
if (wm->ldr.TlsIndex != -1) call_tls_callbacks( wm->ldr.BaseAddress, reason );
|
||||
- if (!entry) return STATUS_SUCCESS;
|
||||
+ if (!entry || !(wm->ldr.Flags & LDR_IMAGE_IS_DLL)) return STATUS_SUCCESS;
|
||||
|
||||
if (TRACE_ON(relay))
|
||||
{
|
||||
--
|
||||
1.7.9.5
|
||||
|
4
patches/ntdll-loader_EntryPoint/definition
Normal file
4
patches/ntdll-loader_EntryPoint/definition
Normal file
@@ -0,0 +1,4 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Set ldr.EntryPoint for main executable.
|
||||
Revision: 1
|
||||
Fixes: [33034] Set ldr.EntryPoint for main executable
|
Reference in New Issue
Block a user