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
7527869f
Commit
7527869f
authored
Jul 11, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Jul 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Preserve rbx register when calling DLL entry point on x64.
parent
a3de8d19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
loader.c
dlls/ntdll/loader.c
+26
-3
No files found.
dlls/ntdll/loader.c
View file @
7527869f
...
...
@@ -264,7 +264,7 @@ void WINAPI RtlGetUnloadEventTraceEx(ULONG **size, ULONG **count, void **trace)
* that only modifying esi leads to a crash, so use this one to backup
* ebp while running the dll entry proc.
*/
#if
def __i386__
#if
defined(__i386__)
extern
BOOL
call_dll_entry_point
(
DLLENTRYPROC
proc
,
void
*
module
,
UINT
reason
,
void
*
reserved
);
__ASM_GLOBAL_FUNC
(
call_dll_entry_point
,
"pushl %ebp
\n\t
"
...
...
@@ -298,13 +298,36 @@ __ASM_GLOBAL_FUNC(call_dll_entry_point,
__ASM_CFI
(
".cfi_def_cfa %esp,4
\n\t
"
)
__ASM_CFI
(
".cfi_same_value %ebp
\n\t
"
)
"ret"
)
#else
/* __i386__ */
#elif defined(__x86_64__)
extern
BOOL
CDECL
call_dll_entry_point
(
DLLENTRYPROC
proc
,
void
*
module
,
UINT
reason
,
void
*
reserved
);
/* Some apps modify rbx in TLS entry point. */
__ASM_GLOBAL_FUNC
(
call_dll_entry_point
,
"pushq %rbx
\n\t
"
__ASM_SEH
(
".seh_pushreg %rbx
\n\t
"
)
__ASM_CFI
(
".cfi_adjust_cfa_offset 8
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %rbx,0
\n\t
"
)
"subq $48,%rsp
\n\t
"
__ASM_SEH
(
".seh_stackalloc 48
\n\t
"
)
__ASM_SEH
(
".seh_endprologue
\n\t
"
)
__ASM_CFI
(
".cfi_adjust_cfa_offset 48
\n\t
"
)
"mov %rcx,%r10
\n\t
"
"mov %rdx,%rcx
\n\t
"
"mov %r8d,%edx
\n\t
"
"mov %r9,%r8
\n\t
"
"call *%r10
\n\t
"
"addq $48,%rsp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset -48
\n\t
"
)
"popq %rbx
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset -8
\n\t
"
)
__ASM_CFI
(
".cfi_same_value %rbx
\n\t
"
)
"ret"
)
#else
static
inline
BOOL
call_dll_entry_point
(
DLLENTRYPROC
proc
,
void
*
module
,
UINT
reason
,
void
*
reserved
)
{
return
proc
(
module
,
reason
,
reserved
);
}
#endif
/* __i386__ */
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
...
...
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