Commit c1295953 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use the correct machine when loading ntdll on ARM64EC.

parent 0d37cc1d
......@@ -1641,6 +1641,7 @@ static void load_ntdll(void)
static WCHAR path[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\',
's','y','s','t','e','m','3','2','\\','n','t','d','l','l','.','d','l','l',0};
const char *pe_dir = get_pe_dir( current_machine );
USHORT machine = current_machine;
unsigned int status;
SECTION_IMAGE_INFORMATION info;
OBJECT_ATTRIBUTES attr;
......@@ -1654,7 +1655,9 @@ static void load_ntdll(void)
if (build_dir) asprintf( &name, "%s%s/ntdll.dll", ntdll_dir, pe_dir );
else asprintf( &name, "%s%s/ntdll.dll", dll_dir, pe_dir );
status = open_builtin_pe_file( name, &attr, &module, &size, &info, 0, 0, current_machine, FALSE );
if (is_arm64ec()) machine = main_image_info.Machine;
status = open_builtin_pe_file( name, &attr, &module, &size, &info, 0, 0, machine, FALSE );
if (status == STATUS_DLL_NOT_FOUND)
{
free( name );
......
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