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
f64e34b0
Commit
f64e34b0
authored
Apr 06, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1938ddc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
loader.c
dlls/ntdll/loader.c
+6
-8
No files found.
dlls/ntdll/loader.c
View file @
f64e34b0
...
...
@@ -2596,7 +2596,6 @@ done:
static
NTSTATUS
load_so_dll
(
LPCWSTR
load_path
,
const
UNICODE_STRING
*
nt_name
,
const
char
*
so_name
,
WINE_MODREF
**
pwm
)
{
char
error
[
256
];
void
*
handle
;
struct
builtin_load_info
info
,
*
prev_info
;
ANSI_STRING
unix_name
;
...
...
@@ -2620,7 +2619,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name,
prev_info
=
builtin_load_info
;
builtin_load_info
=
&
info
;
handle
=
wine_dlopen
(
so_name
?
so_name
:
unix_name
.
Buffer
,
RTLD_NOW
,
error
,
sizeof
(
error
)
);
handle
=
dlopen
(
so_name
?
so_name
:
unix_name
.
Buffer
,
RTLD_NOW
);
builtin_load_info
=
prev_info
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unix_name
.
Buffer
);
...
...
@@ -2628,10 +2627,10 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name,
{
if
(
so_name
)
{
ERR
(
"failed to load .so lib %s: %s
\n
"
,
debugstr_a
(
so_name
),
error
);
ERR
(
"failed to load .so lib %s: %s
\n
"
,
debugstr_a
(
so_name
),
dlerror
()
);
return
STATUS_PROCEDURE_NOT_FOUND
;
}
WARN
(
"failed to load .so lib %s: %s
\n
"
,
debugstr_us
(
nt_name
),
error
);
WARN
(
"failed to load .so lib %s: %s
\n
"
,
debugstr_us
(
nt_name
),
dlerror
()
);
return
STATUS_INVALID_IMAGE_FORMAT
;
}
...
...
@@ -2651,7 +2650,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name,
debugstr_w
(
info
.
wm
->
ldr
.
FullDllName
.
Buffer
),
info
.
wm
->
ldr
.
BaseAddress
,
debugstr_us
(
nt_name
)
);
if
(
info
.
wm
->
ldr
.
LoadCount
!=
-
1
)
info
.
wm
->
ldr
.
LoadCount
++
;
wine_dlclose
(
handle
,
NULL
,
0
);
/* release the libdl refcount */
dlclose
(
handle
);
/* release the libdl refcount */
}
else
{
...
...
@@ -2664,7 +2663,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name,
return
STATUS_SUCCESS
;
failed:
wine_dlclose
(
handle
,
NULL
,
0
);
dlclose
(
handle
);
return
info
.
status
;
}
...
...
@@ -3588,8 +3587,7 @@ static void free_modref( WINE_MODREF *wm )
free_tls_slot
(
&
wm
->
ldr
);
RtlReleaseActivationContext
(
wm
->
ldr
.
ActivationContext
);
if
((
wm
->
ldr
.
Flags
&
LDR_WINE_INTERNAL
)
&&
wm
->
ldr
.
SectionHandle
)
wine_dlclose
(
wm
->
ldr
.
SectionHandle
,
NULL
,
0
);
if
((
wm
->
ldr
.
Flags
&
LDR_WINE_INTERNAL
)
&&
wm
->
ldr
.
SectionHandle
)
dlclose
(
wm
->
ldr
.
SectionHandle
);
NtUnmapViewOfSection
(
NtCurrentProcess
(),
wm
->
ldr
.
BaseAddress
);
if
(
cached_modref
==
wm
)
cached_modref
=
NULL
;
RtlFreeUnicodeString
(
&
wm
->
ldr
.
FullDllName
);
...
...
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