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
aa234f3a
Commit
aa234f3a
authored
Nov 02, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
Nov 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't add dependencies for system dlls.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
250c1131
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
module.c
dlls/kernel32/tests/module.c
+2
-2
loader.c
dlls/ntdll/loader.c
+16
-1
No files found.
dlls/kernel32/tests/module.c
View file @
aa234f3a
...
...
@@ -1409,7 +1409,7 @@ static void test_ddag_node(void)
}
mod2
=
CONTAINING_RECORD
(
dep_node
->
Modules
.
Flink
,
LDR_DATA_TABLE_ENTRY
,
NodeModuleLink
);
todo_wine
ok
(
!
lstrcmpW
(
mod2
->
BaseDllName
.
Buffer
,
expected_exe_dependencies
[
i
].
dllname
),
ok
(
!
lstrcmpW
(
mod2
->
BaseDllName
.
Buffer
,
expected_exe_dependencies
[
i
].
dllname
),
"Got unexpected module %s.
\n
"
,
debugstr_w
(
mod2
->
BaseDllName
.
Buffer
));
se2
=
dep_node
->
IncomingDependencies
.
Tail
;
...
...
@@ -1428,7 +1428,7 @@ static void test_ddag_node(void)
winetest_pop_context
();
prev_node
=
dep_node
;
}
todo_wine
ok
(
se
==
node
->
Dependencies
.
Tail
,
"Expected end of the list.
\n
"
);
ok
(
se
==
node
->
Dependencies
.
Tail
,
"Expected end of the list.
\n
"
);
}
START_TEST
(
module
)
...
...
dlls/ntdll/loader.c
View file @
aa234f3a
...
...
@@ -182,6 +182,8 @@ static WINE_MODREF *cached_modref;
static
WINE_MODREF
*
current_modref
;
static
WINE_MODREF
*
last_failed_modref
;
static
LDR_DDAG_NODE
*
node_ntdll
,
*
node_kernel32
;
static
NTSTATUS
load_dll
(
const
WCHAR
*
load_path
,
const
WCHAR
*
libname
,
const
WCHAR
*
default_ext
,
DWORD
flags
,
WINE_MODREF
**
pwm
);
static
NTSTATUS
process_attach
(
LDR_DDAG_NODE
*
node
,
LPVOID
lpReserved
);
...
...
@@ -1280,7 +1282,10 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
imp
=
NULL
;
status
=
STATUS_DLL_NOT_FOUND
;
}
else
add_module_dependency_after
(
wm
->
ldr
.
DdagNode
,
imp
->
ldr
.
DdagNode
,
dep_after
);
else
if
(
!
is_import_dll_system
(
&
wm
->
ldr
,
&
imports
[
i
]
))
{
add_module_dependency_after
(
wm
->
ldr
.
DdagNode
,
imp
->
ldr
.
DdagNode
,
dep_after
);
}
}
current_modref
=
prev
;
if
(
wm
->
ldr
.
ActivationContext
)
RtlDeactivateActivationContext
(
0
,
cookie
);
...
...
@@ -2076,6 +2081,7 @@ static void build_ntdll_module(void)
wm
=
alloc_module
(
meminfo
.
AllocationBase
,
&
nt_name
,
TRUE
);
assert
(
wm
);
wm
->
ldr
.
Flags
&=
~
LDR_DONT_RESOLVE_REFS
;
node_ntdll
=
wm
->
ldr
.
DdagNode
;
if
(
TRACE_ON
(
relay
))
RELAY_SetupDLL
(
meminfo
.
AllocationBase
);
}
...
...
@@ -4004,6 +4010,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
NtTerminateProcess
(
GetCurrentProcess
(),
status
);
}
kernel32_handle
=
kernel32
->
ldr
.
DllBase
;
node_kernel32
=
kernel32
->
ldr
.
DdagNode
;
RtlInitAnsiString
(
&
func_name
,
"BaseThreadInitThunk"
);
if
((
status
=
LdrGetProcedureAddress
(
kernel32_handle
,
&
func_name
,
0
,
(
void
**
)
&
pBaseThreadInitThunk
))
!=
STATUS_SUCCESS
)
...
...
@@ -4053,6 +4060,14 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
if
(
wm
->
ldr
.
ActivationContext
)
RtlActivateActivationContext
(
0
,
wm
->
ldr
.
ActivationContext
,
&
cookie
);
if
((
status
=
process_attach
(
node_ntdll
,
context
))
||
(
status
=
process_attach
(
node_kernel32
,
context
)))
{
ERR
(
"Initializing system dll for %s failed, status %x
\n
"
,
debugstr_w
(
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
ImagePathName
.
Buffer
),
status
);
NtTerminateProcess
(
GetCurrentProcess
(),
status
);
}
if
((
status
=
walk_node_dependencies
(
wm
->
ldr
.
DdagNode
,
context
,
process_attach
)))
{
if
(
last_failed_modref
)
...
...
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