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
c2c57e8d
Commit
c2c57e8d
authored
Feb 16, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use the SECTION_IMAGE_INFORMATION bitfields where possible.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
584427fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
loader.c
dlls/ntdll/loader.c
+8
-8
loader.c
dlls/ntdll/unix/loader.c
+1
-1
winternl.h
include/winternl.h
+5
-0
No files found.
dlls/ntdll/loader.c
View file @
c2c57e8d
...
...
@@ -1877,12 +1877,12 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
/* create the MODREF */
if
(
!
(
wm
=
alloc_module
(
*
module
,
nt_name
,
(
image_info
->
u
.
ImageFlags
&
IMAGE_FLAGS_
WineBuiltin
)
)))
if
(
!
(
wm
=
alloc_module
(
*
module
,
nt_name
,
(
image_info
->
u
.
s
.
WineBuiltin
)
)))
return
STATUS_NO_MEMORY
;
if
(
id
)
wm
->
id
=
*
id
;
if
(
image_info
->
LoaderFlags
)
wm
->
ldr
.
Flags
|=
LDR_COR_IMAGE
;
if
(
image_info
->
u
.
ImageFlags
&
IMAGE_FLAGS_
ComPlusILOnly
)
wm
->
ldr
.
Flags
|=
LDR_COR_ILONLY
;
if
(
image_info
->
u
.
s
.
ComPlusILOnly
)
wm
->
ldr
.
Flags
|=
LDR_COR_ILONLY
;
set_security_cookie
(
*
module
,
map_size
);
...
...
@@ -1916,7 +1916,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
TRACE
(
"loaded %s %p %p
\n
"
,
debugstr_us
(
nt_name
),
wm
,
*
module
);
if
(
image_info
->
u
.
ImageFlags
&
IMAGE_FLAGS_
WineBuiltin
)
if
(
image_info
->
u
.
s
.
WineBuiltin
)
{
if
(
TRACE_ON
(
relay
))
RELAY_SetupDLL
(
*
module
);
}
...
...
@@ -1926,7 +1926,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
}
TRACE_
(
loaddll
)(
"Loaded %s at %p: %s
\n
"
,
debugstr_w
(
wm
->
ldr
.
FullDllName
.
Buffer
),
*
module
,
(
image_info
->
u
.
ImageFlags
&
IMAGE_FLAGS_
WineBuiltin
)
?
"builtin"
:
"native"
);
(
image_info
->
u
.
s
.
WineBuiltin
)
?
"builtin"
:
"native"
);
wm
->
ldr
.
LoadCount
=
1
;
*
pwm
=
wm
;
...
...
@@ -1946,7 +1946,7 @@ static NTSTATUS build_builtin_module( const WCHAR *load_path, const UNICODE_STRI
NTSTATUS
status
;
SECTION_IMAGE_INFORMATION
image_info
=
{
0
};
image_info
.
u
.
ImageFlags
=
IMAGE_FLAGS_WineBuiltin
;
image_info
.
u
.
s
.
WineBuiltin
=
1
;
status
=
build_module
(
load_path
,
nt_name
,
&
module
,
&
image_info
,
NULL
,
flags
,
pwm
);
if
(
status
&&
module
)
unix_funcs
->
unload_builtin_dll
(
module
);
return
status
;
...
...
@@ -2062,7 +2062,7 @@ static BOOL is_valid_binary( HANDLE file, const SECTION_IMAGE_INFORMATION *info
if
(
info
->
Machine
==
IMAGE_FILE_MACHINE_ARM64
)
return
TRUE
;
#endif
if
(
!
info
->
ImageContainsCode
)
return
TRUE
;
if
(
!
(
info
->
u
.
ImageFlags
&
IMAGE_FLAGS_
ComPlusNativeReady
))
if
(
!
(
info
->
u
.
s
.
ComPlusNativeReady
))
{
IMAGE_COR20_HEADER
cor_header
;
if
(
!
get_cor_header
(
file
,
info
,
&
cor_header
))
return
FALSE
;
...
...
@@ -2673,7 +2673,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
break
;
case
STATUS_SUCCESS
:
/* valid PE file */
if
(
image_info
.
u
.
ImageFlags
&
IMAGE_FLAGS_
WineBuiltin
)
if
(
image_info
.
u
.
s
.
WineBuiltin
)
{
switch
(
loadorder
)
{
...
...
@@ -2691,7 +2691,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
}
break
;
}
if
(
!
(
image_info
.
u
.
ImageFlags
&
IMAGE_FLAGS_
WineFakeDll
))
if
(
!
(
image_info
.
u
.
s
.
WineFakeDll
))
{
switch
(
loadorder
)
{
...
...
dlls/ntdll/unix/loader.c
View file @
c2c57e8d
...
...
@@ -1225,7 +1225,7 @@ static NTSTATUS open_dll_file( const char *name, OBJECT_ATTRIBUTES *attr, HANDLE
NtQuerySection
(
*
mapping
,
SectionImageInformation
,
image_info
,
sizeof
(
*
image_info
),
NULL
);
/* ignore non-builtins */
if
(
!
(
image_info
->
u
.
ImageFlags
&
IMAGE_FLAGS_
WineBuiltin
))
if
(
!
(
image_info
->
u
.
s
.
WineBuiltin
))
{
WARN
(
"%s found in WINEDLLPATH but not a builtin, ignoring
\n
"
,
debugstr_a
(
name
)
);
status
=
STATUS_DLL_NOT_FOUND
;
...
...
include/winternl.h
View file @
c2c57e8d
...
...
@@ -2490,7 +2490,12 @@ typedef struct _SECTION_IMAGE_INFORMATION {
UCHAR
ImageMappedFlat
:
1
;
UCHAR
BaseBelow4gb
:
1
;
UCHAR
ComPlusPrefer32bit
:
1
;
#ifdef __WINESRC__
/* Wine extensions */
UCHAR
WineBuiltin
:
1
;
UCHAR
WineFakeDll
:
1
;
#else
UCHAR
Reserved
:
2
;
#endif
}
DUMMYSTRUCTNAME
;
}
DUMMYUNIONNAME
;
ULONG
LoaderFlags
;
...
...
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