Commit 88c5184b authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Consistently fixup the machine type for IL-only binaries.

parent c0198a65
......@@ -2148,8 +2148,6 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
if (!status)
{
if (main_image_info.ImageCharacteristics & IMAGE_FILE_DLL) status = STATUS_INVALID_IMAGE_FORMAT;
if (main_image_info.ImageFlags & IMAGE_FLAGS_ComPlusNativeReady)
main_image_info.Machine = native_machine;
if (main_image_info.Machine != current_machine) status = STATUS_INVALID_IMAGE_FORMAT;
}
......
......@@ -1569,7 +1569,11 @@ static NTSTATUS open_main_image( WCHAR *image, void **module, SECTION_IMAGE_INFO
*module = NULL;
status = NtMapViewOfSection( mapping, NtCurrentProcess(), module, 0, 0, NULL, &size,
ViewShare, 0, PAGE_EXECUTE_READ );
if (!status) NtQuerySection( mapping, SectionImageInformation, info, sizeof(*info), NULL );
if (!status)
{
NtQuerySection( mapping, SectionImageInformation, info, sizeof(*info), NULL );
if (info->u.s.ComPlusNativeReady) info->Machine = native_machine;
}
NtClose( mapping );
}
else if (status == STATUS_INVALID_IMAGE_NOT_MZ && loadorder != LO_NATIVE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment