Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
3d66e96b
Commit
3d66e96b
authored
Oct 31, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Only check Wow64 system directories for 32-bit platforms.
parent
123b86fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
loader.c
dlls/ntdll/unix/loader.c
+9
-7
No files found.
dlls/ntdll/unix/loader.c
View file @
3d66e96b
...
...
@@ -1568,8 +1568,6 @@ static const WCHAR *get_machine_wow64_dir( WORD machine )
static
const
WCHAR
system32
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
's'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'3'
,
'2'
,
'\\'
,
0
};
static
const
WCHAR
syswow64
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
's'
,
'y'
,
's'
,
'w'
,
'o'
,
'w'
,
'6'
,
'4'
,
'\\'
,
0
};
static
const
WCHAR
sysarm32
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
's'
,
'y'
,
's'
,
'a'
,
'r'
,
'm'
,
'3'
,
'2'
,
'\\'
,
0
};
static
const
WCHAR
sysx8664
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
's'
,
'y'
,
's'
,
'x'
,
'8'
,
'6'
,
'6'
,
'4'
,
'\\'
,
0
};
static
const
WCHAR
sysarm64
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
's'
,
'y'
,
's'
,
'a'
,
'r'
,
'm'
,
'6'
,
'4'
,
'\\'
,
0
};
if
(
machine
==
native_machine
)
machine
=
IMAGE_FILE_MACHINE_TARGET_HOST
;
...
...
@@ -1578,8 +1576,6 @@ static const WCHAR *get_machine_wow64_dir( WORD machine )
case
IMAGE_FILE_MACHINE_TARGET_HOST
:
return
system32
;
case
IMAGE_FILE_MACHINE_I386
:
return
syswow64
;
case
IMAGE_FILE_MACHINE_ARMNT
:
return
sysarm32
;
case
IMAGE_FILE_MACHINE_AMD64
:
return
sysx8664
;
case
IMAGE_FILE_MACHINE_ARM64
:
return
sysarm64
;
default:
return
NULL
;
}
}
...
...
@@ -1602,6 +1598,7 @@ BOOL is_builtin_path( const UNICODE_STRING *path, WORD *machine )
for
(
i
=
0
;
i
<
supported_machines_count
;
i
++
)
{
sysdir
=
get_machine_wow64_dir
(
supported_machines
[
i
]
);
if
(
!
sysdir
)
continue
;
dirlen
=
wcslen
(
sysdir
);
if
(
len
<=
dirlen
)
continue
;
if
(
wcsnicmp
(
p
,
sysdir
,
dirlen
))
continue
;
...
...
@@ -1941,9 +1938,14 @@ static void load_wow64_ntdll( USHORT machine )
void
*
module
;
unsigned
int
status
;
SIZE_T
size
;
WCHAR
*
path
=
malloc
(
sizeof
(
"
\\
??
\\
C:
\\
windows
\\
system32
\\
ntdll.dll"
)
*
sizeof
(
WCHAR
)
);
const
WCHAR
*
wow64_dir
;
WCHAR
*
path
;
wcscpy
(
path
,
get_machine_wow64_dir
(
machine
));
if
(
machine
==
current_machine
)
return
;
if
(
!
(
wow64_dir
=
get_machine_wow64_dir
(
machine
)))
return
;
path
=
malloc
(
sizeof
(
"
\\
??
\\
C:
\\
windows
\\
system32
\\
ntdll.dll"
)
*
sizeof
(
WCHAR
)
);
wcscpy
(
path
,
wow64_dir
);
wcscat
(
path
,
ntdllW
);
init_unicode_string
(
&
nt_name
,
path
);
status
=
find_builtin_dll
(
&
nt_name
,
&
module
,
&
size
,
&
info
,
0
,
0
,
machine
,
0
,
FALSE
);
...
...
@@ -2004,7 +2006,7 @@ static void start_main_thread(void)
init_thread_stack
(
teb
,
0
,
0
,
0
);
NtCreateKeyedEvent
(
&
keyed_event
,
GENERIC_READ
|
GENERIC_WRITE
,
NULL
,
0
);
load_ntdll
();
if
(
main_image_info
.
Machine
!=
current_machine
)
load_wow64_ntdll
(
main_image_info
.
Machine
);
load_wow64_ntdll
(
main_image_info
.
Machine
);
load_apiset_dll
();
ntdll_init_syscalls
(
&
syscall_table
,
p__wine_syscall_dispatcher
);
server_init_process_done
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment