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
22da5bd7
Commit
22da5bd7
authored
Mar 16, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move the loadorder support to the Unix library.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9e38a680
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
16 deletions
+34
-16
Makefile.in
dlls/ntdll/Makefile.in
+1
-1
loader.c
dlls/ntdll/loader.c
+1
-1
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+0
-13
loader.c
dlls/ntdll/unix/loader.c
+1
-0
loadorder.c
dlls/ntdll/unix/loadorder.c
+0
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+18
-0
unixlib.h
dlls/ntdll/unixlib.h
+13
-1
No files found.
dlls/ntdll/Makefile.in
View file @
22da5bd7
...
...
@@ -20,7 +20,6 @@ C_SRCS = \
heap.c
\
large_int.c
\
loader.c
\
loadorder.c
\
locale.c
\
misc.c
\
nt.c
\
...
...
@@ -48,6 +47,7 @@ C_SRCS = \
unix/env.c
\
unix/file.c
\
unix/loader.c
\
unix/loadorder.c
\
unix/process.c
\
unix/registry.c
\
unix/security.c
\
...
...
dlls/ntdll/loader.c
View file @
22da5bd7
...
...
@@ -2627,7 +2627,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
if
(
nts
&&
nts
!=
STATUS_DLL_NOT_FOUND
&&
nts
!=
STATUS_INVALID_IMAGE_NOT_MZ
)
goto
done
;
main_exe
=
get_modref
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
loadorder
=
get_load_order
(
main_exe
?
main_exe
->
ldr
.
BaseDllName
.
Buffer
:
NULL
,
&
nt_name
);
loadorder
=
unix_funcs
->
get_load_order
(
main_exe
?
main_exe
->
ldr
.
BaseDllName
.
Buffer
:
NULL
,
&
nt_name
);
prev
=
NtCurrentTeb
()
->
Tib
.
ArbitraryUserPointer
;
NtCurrentTeb
()
->
Tib
.
ArbitraryUserPointer
=
nt_name
.
Buffer
+
4
;
...
...
dlls/ntdll/ntdll_misc.h
View file @
22da5bd7
...
...
@@ -90,19 +90,6 @@ extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format,
/* load order */
enum
loadorder
{
LO_INVALID
,
LO_DISABLED
,
LO_NATIVE
,
LO_BUILTIN
,
LO_NATIVE_BUILTIN
,
/* native then builtin */
LO_BUILTIN_NATIVE
,
/* builtin then native */
LO_DEFAULT
/* nothing specified, use default strategy */
};
extern
enum
loadorder
get_load_order
(
const
WCHAR
*
app_name
,
const
UNICODE_STRING
*
nt_name
)
DECLSPEC_HIDDEN
;
#ifndef _WIN64
static
inline
TEB64
*
NtCurrentTeb64
(
void
)
{
return
(
TEB64
*
)
NtCurrentTeb
()
->
GdiBatchCount
;
}
#endif
...
...
dlls/ntdll/unix/loader.c
View file @
22da5bd7
...
...
@@ -1592,6 +1592,7 @@ static struct unix_funcs unix_funcs =
load_builtin_dll
,
init_builtin_dll
,
unwind_builtin_dll
,
get_load_order
,
__wine_dbg_get_channel_flags
,
__wine_dbg_strdup
,
__wine_dbg_output
,
...
...
dlls/ntdll/loadorder.c
→
dlls/ntdll/
unix/
loadorder.c
View file @
22da5bd7
This diff is collapsed.
Click to expand it.
dlls/ntdll/unix/unix_private.h
View file @
22da5bd7
...
...
@@ -382,6 +382,8 @@ static inline void context_init_xstate( CONTEXT *context, void *xstate_buffer )
}
#endif
extern
enum
loadorder
CDECL
get_load_order
(
const
WCHAR
*
app_name
,
const
UNICODE_STRING
*
nt_name
)
DECLSPEC_HIDDEN
;
static
inline
size_t
ntdll_wcslen
(
const
WCHAR
*
str
)
{
const
WCHAR
*
s
=
str
;
...
...
@@ -434,6 +436,20 @@ static inline WCHAR *ntdll_wcspbrk( const WCHAR *str, const WCHAR *accept )
return
NULL
;
}
static
inline
SIZE_T
ntdll_wcsspn
(
const
WCHAR
*
str
,
const
WCHAR
*
accept
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
!
ntdll_wcschr
(
accept
,
*
ptr
))
break
;
return
ptr
-
str
;
}
static
inline
SIZE_T
ntdll_wcscspn
(
const
WCHAR
*
str
,
const
WCHAR
*
reject
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
ntdll_wcschr
(
reject
,
*
ptr
))
break
;
return
ptr
-
str
;
}
static
inline
WCHAR
ntdll_towupper
(
WCHAR
ch
)
{
return
ch
+
uctable
[
uctable
[
uctable
[
ch
>>
8
]
+
((
ch
>>
4
)
&
0x0f
)]
+
(
ch
&
0x0f
)];
...
...
@@ -478,6 +494,8 @@ static inline int ntdll_wcsnicmp( const WCHAR *str1, const WCHAR *str2, int n )
#define wcschr(str,ch) ntdll_wcschr(str,ch)
#define wcsrchr(str,ch) ntdll_wcsrchr(str,ch)
#define wcspbrk(str,ac) ntdll_wcspbrk(str,ac)
#define wcsspn(str,ac) ntdll_wcsspn(str,ac)
#define wcscspn(str,rej) ntdll_wcscspn(str,rej)
#define wcsicmp(s1, s2) ntdll_wcsicmp(s1,s2)
#define wcsnicmp(s1, s2,n) ntdll_wcsnicmp(s1,s2,n)
#define wcsupr(str) ntdll_wcsupr(str)
...
...
dlls/ntdll/unixlib.h
View file @
22da5bd7
...
...
@@ -25,8 +25,19 @@
struct
_DISPATCHER_CONTEXT
;
enum
loadorder
{
LO_INVALID
,
LO_DISABLED
,
LO_NATIVE
,
LO_BUILTIN
,
LO_NATIVE_BUILTIN
,
/* native then builtin */
LO_BUILTIN_NATIVE
,
/* builtin then native */
LO_DEFAULT
/* nothing specified, use default strategy */
};
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 11
6
#define NTDLL_UNIXLIB_VERSION 11
7
struct
unix_funcs
{
...
...
@@ -79,6 +90,7 @@ struct unix_funcs
void
(
CDECL
*
init_builtin_dll
)(
void
*
module
);
NTSTATUS
(
CDECL
*
unwind_builtin_dll
)(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
);
enum
loadorder
(
CDECL
*
get_load_order
)(
const
WCHAR
*
app_name
,
const
UNICODE_STRING
*
nt_name
);
/* debugging functions */
unsigned
char
(
CDECL
*
dbg_get_channel_flags
)(
struct
__wine_debug_channel
*
channel
);
...
...
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