Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
870340ee
Commit
870340ee
authored
Apr 19, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Load libwine before the main image.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51018
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e436a40e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
loader.c
dlls/ntdll/unix/loader.c
+9
-9
No files found.
dlls/ntdll/unix/loader.c
View file @
870340ee
...
...
@@ -115,6 +115,9 @@ static char *argv0;
static
const
char
*
bin_dir
;
static
const
char
*
dll_dir
;
static
SIZE_T
dll_path_maxlen
;
static
int
*
p___wine_main_argc
;
static
char
***
p___wine_main_argv
;
static
WCHAR
***
p___wine_main_wargv
;
const
char
*
home_dir
=
NULL
;
const
char
*
data_dir
=
NULL
;
...
...
@@ -938,11 +941,8 @@ static void load_libwine(void)
#define LIBWINE "libwine.so.1"
#endif
typedef
void
(
*
load_dll_callback_t
)(
void
*
,
const
char
*
);
static
void
(
*
p_wine_dll_set_callback
)(
load_dll_callback_t
load
);
static
int
*
p___wine_main_argc
;
static
char
***
p___wine_main_argv
;
static
char
***
p___wine_main_environ
;
static
WCHAR
***
p___wine_main_wargv
;
void
(
*
p_wine_dll_set_callback
)(
load_dll_callback_t
load
);
char
***
p___wine_main_environ
;
char
*
path
;
void
*
handle
;
...
...
@@ -961,9 +961,6 @@ static void load_libwine(void)
p___wine_main_environ
=
dlsym
(
handle
,
"__wine_main_environ"
);
if
(
p_wine_dll_set_callback
)
p_wine_dll_set_callback
(
load_builtin_callback
);
if
(
p___wine_main_argc
)
*
p___wine_main_argc
=
main_argc
;
if
(
p___wine_main_argv
)
*
p___wine_main_argv
=
main_argv
;
if
(
p___wine_main_wargv
)
*
p___wine_main_wargv
=
main_wargv
;
if
(
p___wine_main_environ
)
*
p___wine_main_environ
=
main_envp
;
}
...
...
@@ -1777,14 +1774,17 @@ static void start_main_thread(void)
init_cpu_info
();
syscall_dispatcher
=
signal_init_syscalls
();
init_files
();
load_libwine
();
init_startup_info
();
if
(
p___wine_main_argc
)
*
p___wine_main_argc
=
main_argc
;
if
(
p___wine_main_argv
)
*
p___wine_main_argv
=
main_argv
;
if
(
p___wine_main_wargv
)
*
p___wine_main_wargv
=
main_wargv
;
virtual_alloc_thread_stack
(
&
stack
,
0
,
0
,
NULL
);
teb
->
Tib
.
StackBase
=
stack
.
StackBase
;
teb
->
Tib
.
StackLimit
=
stack
.
StackLimit
;
teb
->
DeallocationStack
=
stack
.
DeallocationStack
;
NtCreateKeyedEvent
(
&
keyed_event
,
GENERIC_READ
|
GENERIC_WRITE
,
NULL
,
0
);
load_ntdll
();
load_libwine
();
status
=
p__wine_set_unix_funcs
(
NTDLL_UNIXLIB_VERSION
,
&
unix_funcs
);
if
(
status
==
STATUS_REVISION_MISMATCH
)
{
...
...
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