From 850ae994c6ca4eb9bd016bf3dfd1c72c918eba1b Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Wed, 14 Jun 2006 02:38:34 +0100 Subject: [PATCH] ntdll: Change the test for no relocation information to use the IMAGE_FILE_RELOCS_STRIPPED flag instead of a zero sized relocations section. This fixes loading of resource-only DLLs that have a load-address of 0x400000. --- dlls/ntdll/virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 0a7516f5a6f..8f6296f04d8 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1038,7 +1038,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz const IMAGE_DATA_DIRECTORY *relocs; relocs = &nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC]; - if (!relocs->VirtualAddress || !relocs->Size) + if (nt->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED) { if (nt->OptionalHeader.ImageBase == 0x400000) { ERR("Image was mapped at %p: standard load address for a Win32 program (0x00400000) not available\n", ptr); -- 2.11.4.GIT