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
1d368b37
Commit
1d368b37
authored
May 12, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Move the Wine-specific flags out of the image_flags field.
parent
8f9c0c82
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
25 deletions
+17
-25
loader.c
dlls/ntdll/unix/loader.c
+5
-8
virtual.c
dlls/ntdll/unix/virtual.c
+1
-1
server_protocol.h
include/wine/server_protocol.h
+4
-4
winternl.h
include/winternl.h
+0
-5
mapping.c
server/mapping.c
+4
-4
protocol.def
server/protocol.def
+3
-3
No files found.
dlls/ntdll/unix/loader.c
View file @
1d368b37
...
...
@@ -732,7 +732,7 @@ NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_i
ULONGLONG
res_end
=
pe_info
->
base
+
pe_info
->
map_size
;
char
preloader_reserve
[
64
],
socket_env
[
64
];
if
(
pe_info
->
image_flags
&
IMAGE_FLAGS_WineFakeD
ll
)
res_start
=
res_end
=
0
;
if
(
pe_info
->
wine_faked
ll
)
res_start
=
res_end
=
0
;
if
(
pe_info
->
image_flags
&
IMAGE_FLAGS_ComPlusNativeReady
)
machine
=
native_machine
;
signal
(
SIGPIPE
,
SIG_DFL
);
...
...
@@ -1131,12 +1131,12 @@ static void fill_builtin_image_info( void *module, pe_image_info_t *info )
const
IMAGE_DOS_HEADER
*
dos
=
(
const
IMAGE_DOS_HEADER
*
)
module
;
const
IMAGE_NT_HEADERS
*
nt
=
(
IMAGE_NT_HEADERS
*
)((
const
BYTE
*
)
dos
+
dos
->
e_lfanew
);
memset
(
info
,
0
,
sizeof
(
*
info
)
);
info
->
base
=
nt
->
OptionalHeader
.
ImageBase
;
info
->
entry_point
=
nt
->
OptionalHeader
.
AddressOfEntryPoint
;
info
->
map_size
=
nt
->
OptionalHeader
.
SizeOfImage
;
info
->
stack_size
=
nt
->
OptionalHeader
.
SizeOfStackReserve
;
info
->
stack_commit
=
nt
->
OptionalHeader
.
SizeOfStackCommit
;
info
->
zerobits
=
0
;
info
->
subsystem
=
nt
->
OptionalHeader
.
Subsystem
;
info
->
subsystem_minor
=
nt
->
OptionalHeader
.
MinorSubsystemVersion
;
info
->
subsystem_major
=
nt
->
OptionalHeader
.
MajorSubsystemVersion
;
...
...
@@ -1146,13 +1146,10 @@ static void fill_builtin_image_info( void *module, pe_image_info_t *info )
info
->
dll_charact
=
nt
->
OptionalHeader
.
DllCharacteristics
;
info
->
machine
=
nt
->
FileHeader
.
Machine
;
info
->
contains_code
=
TRUE
;
info
->
image_flags
=
IMAGE_FLAGS_WineBuiltin
;
info
->
loader_flags
=
0
;
info
->
wine_builtin
=
TRUE
;
info
->
header_size
=
nt
->
OptionalHeader
.
SizeOfHeaders
;
info
->
file_size
=
nt
->
OptionalHeader
.
SizeOfImage
;
info
->
checksum
=
nt
->
OptionalHeader
.
CheckSum
;
info
->
dbg_offset
=
0
;
info
->
dbg_size
=
0
;
}
...
...
@@ -1573,12 +1570,12 @@ NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename,
if
(
loadorder
==
LO_DISABLED
)
return
STATUS_DLL_NOT_FOUND
;
if
(
image_info
->
image_flags
&
IMAGE_FLAGS_WineB
uiltin
)
if
(
image_info
->
wine_b
uiltin
)
{
if
(
loadorder
==
LO_NATIVE
)
return
STATUS_DLL_NOT_FOUND
;
loadorder
=
LO_BUILTIN_NATIVE
;
/* load builtin, then fallback to the file we found */
}
else
if
(
image_info
->
image_flags
&
IMAGE_FLAGS_WineFakeD
ll
)
else
if
(
image_info
->
wine_faked
ll
)
{
TRACE
(
"%s is a fake Wine dll
\n
"
,
debugstr_w
(
filename
)
);
if
(
loadorder
==
LO_NATIVE
)
return
STATUS_DLL_NOT_FOUND
;
...
...
dlls/ntdll/unix/virtual.c
View file @
1d368b37
...
...
@@ -3042,7 +3042,7 @@ NTSTATUS virtual_map_builtin_module( HANDLE mapping, void **module, SIZE_T *size
*
size
=
0
;
filename
=
(
WCHAR
*
)(
image_info
+
1
);
if
(
!
(
image_info
->
image_flags
&
IMAGE_FLAGS_WineBuiltin
)
)
/* ignore non-builtins */
if
(
!
image_info
->
wine_builtin
)
/* ignore non-builtins */
{
WARN
(
"%s found in WINEDLLPATH but not a builtin, ignoring
\n
"
,
debugstr_w
(
filename
)
);
status
=
STATUS_DLL_NOT_FOUND
;
...
...
include/wine/server_protocol.h
View file @
1d368b37
...
...
@@ -834,7 +834,9 @@ typedef struct
unsigned
short
image_charact
;
unsigned
short
dll_charact
;
unsigned
short
machine
;
unsigned
char
contains_code
;
unsigned
char
contains_code
:
1
;
unsigned
char
wine_builtin
:
1
;
unsigned
char
wine_fakedll
:
1
;
unsigned
char
image_flags
;
unsigned
int
loader_flags
;
unsigned
int
header_size
;
...
...
@@ -849,8 +851,6 @@ typedef struct
#define IMAGE_FLAGS_ImageMappedFlat 0x08
#define IMAGE_FLAGS_BaseBelow4gb 0x10
#define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
#define IMAGE_FLAGS_WineBuiltin 0x40
#define IMAGE_FLAGS_WineFakeDll 0x80
struct
rawinput_device
{
...
...
@@ -6393,7 +6393,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 76
5
#define SERVER_PROTOCOL_VERSION 76
6
/* ### protocol_version end ### */
...
...
include/winternl.h
View file @
1d368b37
...
...
@@ -3251,12 +3251,7 @@ 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
;
...
...
server/mapping.c
View file @
1d368b37
...
...
@@ -803,10 +803,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
mapping
->
image
.
zerobits
=
0
;
/* FIXME */
mapping
->
image
.
file_size
=
file_size
;
mapping
->
image
.
loader_flags
=
clr_va
&&
clr_size
;
if
(
mz_size
==
sizeof
(
mz
)
&&
!
memcmp
(
mz
.
buffer
,
builtin_signature
,
sizeof
(
builtin_signature
)
))
mapping
->
image
.
image_flags
|=
IMAGE_FLAGS_WineBuiltin
;
else
if
(
mz_size
==
sizeof
(
mz
)
&&
!
memcmp
(
mz
.
buffer
,
fakedll_signature
,
sizeof
(
fakedll_signature
)
))
mapping
->
image
.
image_flags
|=
IMAGE_FLAGS_WineFakeDll
;
mapping
->
image
.
wine_builtin
=
(
mz_size
==
sizeof
(
mz
)
&&
!
memcmp
(
mz
.
buffer
,
builtin_signature
,
sizeof
(
builtin_signature
)
))
;
mapping
->
image
.
wine_fakedll
=
(
mz_size
==
sizeof
(
mz
)
&&
!
memcmp
(
mz
.
buffer
,
fakedll_signature
,
sizeof
(
fakedll_signature
)
))
;
/* load the section headers */
...
...
server/protocol.def
View file @
1d368b37
...
...
@@ -850,7 +850,9 @@ typedef struct
unsigned short image_charact;
unsigned short dll_charact;
unsigned short machine;
unsigned char contains_code;
unsigned char contains_code : 1;
unsigned char wine_builtin : 1;
unsigned char wine_fakedll : 1;
unsigned char image_flags;
unsigned int loader_flags;
unsigned int header_size;
...
...
@@ -865,8 +867,6 @@ typedef struct
#define IMAGE_FLAGS_ImageMappedFlat 0x08
#define IMAGE_FLAGS_BaseBelow4gb 0x10
#define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
#define IMAGE_FLAGS_WineBuiltin 0x40
#define IMAGE_FLAGS_WineFakeDll 0x80
struct rawinput_device
{
...
...
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