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
c87aa2b9
Commit
c87aa2b9
authored
Jan 25, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Support loading old runtime versions of IL-only images.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
96eebec9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
loader.c
dlls/kernel32/tests/loader.c
+3
-2
loader.c
dlls/ntdll/loader.c
+8
-1
No files found.
dlls/kernel32/tests/loader.c
View file @
c87aa2b9
...
...
@@ -522,13 +522,14 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG
mod
=
LoadLibraryExA
(
dll_name
,
0
,
DONT_RESOLVE_DLL_REFERENCES
);
if
(
!
has_code
&&
nt_header
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR32_MAGIC
)
{
BOOL
il_only
=
FALSE
;
BOOL
il_only
=
FALSE
,
want_32bit
=
FALSE
;
if
(((
const
IMAGE_NT_HEADERS32
*
)
nt_header
)
->
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
].
VirtualAddress
)
{
const
IMAGE_COR20_HEADER
*
cor_header
=
section_data
;
il_only
=
(
cor_header
->
Flags
&
COMIMAGE_FLAGS_ILONLY
)
!=
0
;
if
(
il_only
)
want_32bit
=
(
cor_header
->
Flags
&
COMIMAGE_FLAGS_32BITREQUIRED
)
!=
0
;
}
ok
(
mod
!=
NULL
||
broken
(
il_only
),
/* <= win7 */
ok
(
mod
!=
NULL
||
want_32bit
||
broken
(
il_only
),
/* <= win7 */
"%u: loading failed err %u
\n
"
,
line
,
GetLastError
()
);
}
else
...
...
dlls/ntdll/loader.c
View file @
c87aa2b9
...
...
@@ -1989,7 +1989,14 @@ static BOOL is_valid_binary( HMODULE module, const pe_image_info_t *info )
if
(
info
->
machine
==
IMAGE_FILE_MACHINE_ARM64
)
return
TRUE
;
#endif
if
(
!
info
->
contains_code
)
return
TRUE
;
if
(
!
(
info
->
image_flags
&
IMAGE_FLAGS_ComPlusNativeReady
))
return
FALSE
;
if
(
!
(
info
->
image_flags
&
IMAGE_FLAGS_ComPlusNativeReady
))
{
/* check COM header directly, ignoring runtime version */
DWORD
size
;
const
IMAGE_COR20_HEADER
*
cor_header
=
RtlImageDirectoryEntryToData
(
module
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
,
&
size
);
if
(
!
cor_header
||
!
(
cor_header
->
Flags
&
COMIMAGE_FLAGS_ILONLY
))
return
FALSE
;
}
return
convert_to_pe64
(
module
,
info
);
#else
return
FALSE
;
/* no wow64 support on other platforms */
...
...
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