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.
This commit is contained in:
Robert Shearman 2006-06-14 02:38:34 +01:00 committed by Alexandre Julliard
parent e072d7a0a3
commit 850ae994c6
1 changed files with 1 additions and 1 deletions

View File

@ -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);