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
a86a0222
Commit
a86a0222
authored
Mar 19, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added workaround for broken dlls that modify ebx in their entry point
(reported by Christian Costa).
parent
83877700
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
loader.c
dlls/ntdll/loader.c
+32
-1
No files found.
dlls/ntdll/loader.c
View file @
a86a0222
...
...
@@ -127,6 +127,37 @@ inline static void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
while
(
len
--
)
*
dst
++
=
(
unsigned
char
)
*
src
++
;
}
/*************************************************************************
* call_dll_entry_point
*
* Some brain-damaged dlls (ir32_32.dll for instance) modify ebx in
* their entry point, so we need a small asm wrapper.
*/
#ifdef __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
"
"movl %esp,%ebp
\n\t
"
"pushl %ebx
\n\t
"
"pushl 20(%ebp)
\n\t
"
"pushl 16(%ebp)
\n\t
"
"pushl 12(%ebp)
\n\t
"
"movl 8(%ebp),%eax
\n\t
"
"call *%eax
\n\t
"
"leal -4(%ebp),%esp
\n\t
"
"popl %ebx
\n\t
"
"popl %ebp
\n\t
"
"ret"
);
#else
/* __i386__ */
static
inline
BOOL
call_dll_entry_point
(
DLLENTRYPROC
proc
,
void
*
module
,
UINT
reason
,
void
*
reserved
)
{
return
proc
(
module
,
reason
,
reserved
);
}
#endif
/* __i386__ */
/*************************************************************************
* get_modref
*
...
...
@@ -690,7 +721,7 @@ static BOOL MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved )
else
TRACE
(
"(%p %s,%s,%p) - CALL
\n
"
,
module
,
debugstr_w
(
wm
->
ldr
.
BaseDllName
.
Buffer
),
reason_names
[
reason
],
lpReserved
);
retv
=
entry
(
module
,
reason
,
lpReserved
);
retv
=
call_dll_entry_point
(
entry
,
module
,
reason
,
lpReserved
);
/* The state of the module list may have changed due to the call
to the dll. We cannot assume that this module has not been
...
...
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