ntdll: Use the correct machine when loading ntdll on ARM64EC.
This commit is contained in:
parent
0d37cc1d06
commit
c129595381
1 changed files with 4 additions and 1 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue