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
83a4549e
Commit
83a4549e
authored
Jun 29, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Remove support for being loaded directly from libwine.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15c3eaaf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
70 deletions
+2
-70
loader.c
dlls/ntdll/loader.c
+2
-33
loader.c
dlls/ntdll/unix/loader.c
+0
-37
No files found.
dlls/ntdll/loader.c
View file @
83a4549e
...
...
@@ -3900,33 +3900,6 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
}
static
NTSTATUS
load_ntdll_so
(
HMODULE
module
,
const
IMAGE_NT_HEADERS
*
nt
)
{
NTSTATUS
(
__cdecl
*
init_func
)(
HMODULE
module
,
const
void
*
ptr_in
,
void
*
ptr_out
);
Dl_info
info
;
char
*
name
;
void
*
handle
;
if
(
!
dladdr
(
load_ntdll_so
,
&
info
))
{
fprintf
(
stderr
,
"cannot get path to ntdll.dll.so
\n
"
);
exit
(
1
);
}
name
=
strdup
(
info
.
dli_fname
);
strcpy
(
name
+
strlen
(
name
)
-
strlen
(
".dll.so"
),
".so"
);
if
(
!
(
handle
=
dlopen
(
name
,
RTLD_NOW
)))
{
fprintf
(
stderr
,
"failed to load %s: %s
\n
"
,
name
,
dlerror
()
);
exit
(
1
);
}
if
(
!
(
init_func
=
dlsym
(
handle
,
"__wine_init_unix_lib"
)))
{
fprintf
(
stderr
,
"init func not found in %s
\n
"
,
name
);
exit
(
1
);
}
return
init_func
(
module
,
nt
,
&
unix_funcs
);
}
/***********************************************************************
* __wine_process_init
*/
...
...
@@ -3948,13 +3921,9 @@ void __wine_process_init(void)
HMODULE
ntdll_module
=
(
HMODULE
)((
__wine_spec_nt_header
.
OptionalHeader
.
ImageBase
+
0xffff
)
&
~
0xffff
);
INITIAL_TEB
stack
;
SIZE_T
info_size
;
TEB
*
teb
;
PEB
*
peb
;
if
(
!
unix_funcs
)
load_ntdll_so
(
ntdll_module
,
&
__wine_spec_nt_header
);
TEB
*
teb
=
thread_init
(
&
info_size
);
PEB
*
peb
=
teb
->
Peb
;
teb
=
thread_init
(
&
info_size
);
peb
=
teb
->
Peb
;
peb
->
ProcessHeap
=
RtlCreateHeap
(
HEAP_GROWABLE
,
NULL
,
0
,
0
,
NULL
,
NULL
);
peb
->
LoaderLock
=
&
loader_section
;
...
...
dlls/ntdll/unix/loader.c
View file @
83a4549e
...
...
@@ -105,10 +105,6 @@ static void (CDECL *p__wine_set_unix_funcs)( int version, const struct unix_func
static
void
fatal_error
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
#endif
extern
int
__wine_main_argc
;
extern
char
**
__wine_main_argv
;
extern
char
**
__wine_main_environ
;
#if defined(linux) || defined(__APPLE__)
static
const
BOOL
use_preloader
=
TRUE
;
#else
...
...
@@ -1803,39 +1799,6 @@ void __wine_main( int argc, char *argv[], char *envp[] )
}
static
int
add_area
(
void
*
base
,
size_t
size
,
void
*
arg
)
{
mmap_add_reserved_area
(
base
,
size
);
return
0
;
}
/***********************************************************************
* __wine_init_unix_lib
*
* Lib entry point called by ntdll.dll.so if not yet initialized.
*/
NTSTATUS
__cdecl
__wine_init_unix_lib
(
HMODULE
module
,
const
void
*
ptr_in
,
void
*
ptr_out
)
{
const
IMAGE_NT_HEADERS
*
nt
=
ptr_in
;
#ifdef __APPLE__
extern
char
**
__wine_get_main_environment
(
void
);
char
**
envp
=
__wine_get_main_environment
();
#else
char
**
envp
=
__wine_main_environ
;
#endif
init_paths
(
__wine_main_argc
,
__wine_main_argv
,
envp
);
ntdll_module
=
module
;
map_so_dll
(
nt
,
module
);
fixup_ntdll_imports
(
&
__wine_spec_nt_header
);
init_environment
(
__wine_main_argc
,
__wine_main_argv
,
envp
);
wine_dll_set_callback
(
load_builtin_callback
);
*
(
struct
unix_funcs
**
)
ptr_out
=
&
unix_funcs
;
wine_mmap_enum_reserved_areas
(
add_area
,
NULL
,
0
);
return
STATUS_SUCCESS
;
}
BOOL
WINAPI
DECLSPEC_HIDDEN
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserved
)
{
if
(
reason
==
DLL_PROCESS_ATTACH
)
LdrDisableThreadCalloutsForDll
(
inst
);
...
...
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