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
16937841
Commit
16937841
authored
Nov 17, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Build the syscall argument array from the generated syscall list.
parent
c64aa000
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
loader.c
dlls/ntdll/unix/loader.c
+16
-6
No files found.
dlls/ntdll/unix/loader.c
View file @
16937841
...
...
@@ -115,8 +115,6 @@ void *pRtlUserThreadStart = NULL;
void
*
p__wine_ctrl_routine
=
NULL
;
SYSTEM_DLL_INIT_BLOCK
*
pLdrSystemDllInitBlock
=
NULL
;
static
void
*
p__wine_syscall_dispatcher
;
static
void
*
const
syscalls
[]
=
{
#define SYSCALL_ENTRY(id,name,args) name,
...
...
@@ -128,9 +126,21 @@ static void * const syscalls[] =
#undef SYSCALL_ENTRY
};
static
BYTE
syscall_args
[
ARRAY_SIZE
(
syscalls
)];
static
BYTE
syscall_args
[
ARRAY_SIZE
(
syscalls
)]
=
{
#define SYSCALL_ENTRY(id,name,args) args,
#ifdef _WIN64
ALL_SYSCALLS64
#else
ALL_SYSCALLS32
#endif
#undef SYSCALL_ENTRY
};
SYSTEM_SERVICE_TABLE
KeServiceDescriptorTable
[
4
];
SYSTEM_SERVICE_TABLE
KeServiceDescriptorTable
[
4
]
=
{
{
(
ULONG_PTR
*
)
syscalls
,
NULL
,
ARRAY_SIZE
(
syscalls
),
syscall_args
}
};
#ifdef __GNUC__
static
void
fatal_error
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
...
...
@@ -1518,6 +1528,7 @@ NTSTATUS load_start_exe( WCHAR **image, void **module )
*/
static
void
load_ntdll_functions
(
HMODULE
module
)
{
void
**
p__wine_syscall_dispatcher
;
void
**
p__wine_unix_call_dispatcher
;
unixlib_handle_t
*
p__wine_unixlib_handle
;
const
IMAGE_EXPORT_DIRECTORY
*
exports
;
...
...
@@ -1541,6 +1552,7 @@ static void load_ntdll_functions( HMODULE module )
GET_FUNC
(
__wine_syscall_dispatcher
);
GET_FUNC
(
__wine_unix_call_dispatcher
);
GET_FUNC
(
__wine_unixlib_handle
);
*
p__wine_syscall_dispatcher
=
__wine_syscall_dispatcher
;
*
p__wine_unix_call_dispatcher
=
__wine_unix_call_dispatcher
;
*
p__wine_unixlib_handle
=
(
UINT_PTR
)
unix_call_funcs
;
#undef GET_FUNC
...
...
@@ -1804,7 +1816,6 @@ static ULONG_PTR get_image_address(void)
*/
static
void
start_main_thread
(
void
)
{
SYSTEM_SERVICE_TABLE
syscall_table
=
{
(
ULONG_PTR
*
)
syscalls
,
NULL
,
ARRAY_SIZE
(
syscalls
),
syscall_args
};
TEB
*
teb
=
virtual_alloc_first_teb
();
signal_init_threading
();
...
...
@@ -1822,7 +1833,6 @@ static void start_main_thread(void)
load_ntdll
();
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