Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
af01944a
Commit
af01944a
authored
May 23, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use STATUS_NOT_SUPPORTED for internal machine mismatch errors.
It corresponds to what NtMapViewOfSectionEx() returns with an explicitly specified machine.
parent
685f1b6b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
loader.c
dlls/ntdll/loader.c
+6
-6
loader.c
dlls/ntdll/unix/loader.c
+5
-5
virtual.c
dlls/ntdll/unix/virtual.c
+1
-1
No files found.
dlls/ntdll/loader.c
View file @
af01944a
...
...
@@ -2580,7 +2580,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm, HANDL
if
(
!
is_valid_binary
(
handle
,
image_info
))
{
TRACE
(
"%s is for arch %x, continuing search
\n
"
,
debugstr_us
(
nt_name
),
image_info
->
Machine
);
status
=
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
;
status
=
STATUS_
NOT_SUPPORTED
;
NtClose
(
*
mapping
);
*
mapping
=
NULL
;
}
...
...
@@ -3004,11 +3004,11 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne
RtlAppendUnicodeToString
(
new_name
,
L"
\\
"
);
RtlAppendUnicodeToString
(
new_name
,
name
);
status
=
open_dll_file
(
new_name
,
pwm
,
mapping
,
image_info
,
id
);
if
(
status
==
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
)
found_image
=
TRUE
;
if
(
status
==
STATUS_
NOT_SUPPORTED
)
found_image
=
TRUE
;
else
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
RtlFreeUnicodeString
(
new_name
);
}
if
(
found_image
)
status
=
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
;
if
(
found_image
)
status
=
STATUS_
NOT_SUPPORTED
;
done:
RtlFreeUnicodeString
(
new_name
);
...
...
@@ -3062,13 +3062,13 @@ static NTSTATUS search_dll_file( LPCWSTR paths, LPCWSTR search, UNICODE_STRING *
if
((
status
=
RtlDosPathNameToNtPathName_U_WithStatus
(
name
,
nt_name
,
NULL
,
NULL
)))
goto
done
;
status
=
open_dll_file
(
nt_name
,
pwm
,
mapping
,
image_info
,
id
);
if
(
status
==
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
)
found_image
=
TRUE
;
if
(
status
==
STATUS_
NOT_SUPPORTED
)
found_image
=
TRUE
;
else
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
RtlFreeUnicodeString
(
nt_name
);
paths
=
ptr
;
}
if
(
found_image
)
status
=
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
;
if
(
found_image
)
status
=
STATUS_
NOT_SUPPORTED
;
done:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
name
);
...
...
@@ -3127,7 +3127,7 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, UNI
else
if
(
!
(
status
=
RtlDosPathNameToNtPathName_U_WithStatus
(
libname
,
nt_name
,
NULL
,
NULL
)))
status
=
open_dll_file
(
nt_name
,
pwm
,
mapping
,
image_info
,
id
);
if
(
status
==
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
)
status
=
STATUS_INVALID_IMAGE_FORMAT
;
if
(
status
==
STATUS_
NOT_SUPPORTED
)
status
=
STATUS_INVALID_IMAGE_FORMAT
;
done:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
fullname
);
...
...
dlls/ntdll/unix/loader.c
View file @
af01944a
...
...
@@ -1440,7 +1440,7 @@ static NTSTATUS open_builtin_so_file( const char *name, OBJECT_ATTRIBUTES *attr,
status
=
STATUS_PROCEDURE_NOT_FOUND
;
}
}
else
status
=
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
;
else
status
=
STATUS_
NOT_SUPPORTED
;
close
(
fd
);
return
status
;
...
...
@@ -1525,7 +1525,7 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
file
[
pos
+
len
+
1
]
=
0
;
ptr
=
prepend
(
file
+
pos
,
dll_paths
[
i
],
strlen
(
dll_paths
[
i
])
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
limit
,
machine
,
prefer_native
);
if
(
status
==
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
)
if
(
status
==
STATUS_
NOT_SUPPORTED
)
{
found_image
=
TRUE
;
continue
;
...
...
@@ -1533,11 +1533,11 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
strcpy
(
file
+
pos
+
len
+
1
,
".so"
);
status
=
open_builtin_so_file
(
ptr
,
&
attr
,
module
,
image_info
,
machine
,
prefer_native
);
if
(
status
==
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
)
found_image
=
TRUE
;
if
(
status
==
STATUS_
NOT_SUPPORTED
)
found_image
=
TRUE
;
else
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
}
if
(
found_image
)
status
=
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
;
if
(
found_image
)
status
=
STATUS_
NOT_SUPPORTED
;
WARN
(
"cannot find builtin library for %s
\n
"
,
debugstr_us
(
nt_name
)
);
done:
if
(
status
>=
0
&&
ext
)
...
...
@@ -1591,7 +1591,7 @@ NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename,
return
find_builtin_dll
(
&
nt_name
,
module
,
size
,
&
info
,
limit
,
machine
,
FALSE
);
default:
status
=
find_builtin_dll
(
&
nt_name
,
module
,
size
,
&
info
,
limit
,
machine
,
(
loadorder
==
LO_DEFAULT
)
);
if
(
status
==
STATUS_DLL_NOT_FOUND
||
status
==
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
)
if
(
status
==
STATUS_DLL_NOT_FOUND
||
status
==
STATUS_
NOT_SUPPORTED
)
return
STATUS_IMAGE_ALREADY_LOADED
;
return
status
;
}
...
...
dlls/ntdll/unix/virtual.c
View file @
af01944a
...
...
@@ -3050,7 +3050,7 @@ NTSTATUS virtual_map_builtin_module( HANDLE mapping, void **module, SIZE_T *size
else
if
(
machine
&&
image_info
->
machine
!=
machine
)
{
TRACE
(
"%s is for arch %04x, continuing search
\n
"
,
debugstr_w
(
filename
),
image_info
->
machine
);
status
=
STATUS_
IMAGE_MACHINE_TYPE_MISMATCH
;
status
=
STATUS_
NOT_SUPPORTED
;
}
else
if
(
prefer_native
&&
(
image_info
->
dll_charact
&
IMAGE_DLLCHARACTERISTICS_PREFER_NATIVE
))
{
...
...
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