Module: wine Branch: refs/heads/master Commit: 850ae994c6ca4eb9bd016bf3dfd1c72c918eba1b URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=850ae994c6ca4eb9bd016bf3...
Author: Robert Shearman rob@codeweavers.com Date: Wed Jun 14 02:38:34 2006 +0100
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 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 0a7516f..8f6296f 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1038,7 +1038,7 @@ static NTSTATUS map_image( HANDLE hmappi 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);