Commit c181a0ad authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Use WINAPI calling convention for stub_entry_point().

Otherwise it ends up being stdcall function in the gcc PE build and cdecl in ELF while allocate_stub() currently assumes cdecl. Fixes missing function details output on x64. Signed-off-by: 's avatarPaul Gofman <pgofman@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ff09f148
......@@ -295,7 +295,7 @@ static inline BOOL call_dll_entry_point( DLLENTRYPROC proc, void *module,
*
* Entry point for stub functions.
*/
static void stub_entry_point( const char *dll, const char *name, void *ret_addr )
static void WINAPI stub_entry_point( const char *dll, const char *name, void *ret_addr )
{
EXCEPTION_RECORD rec;
......@@ -406,15 +406,15 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name )
stub->name = name;
stub->entry = stub_entry_point;
#else
stub->movq_rdi[0] = 0x48; /* movq $dll,%rdi */
stub->movq_rdi[1] = 0xbf;
stub->movq_rdi[0] = 0x48; /* movq $dll,%rcx */
stub->movq_rdi[1] = 0xb9;
stub->dll = dll;
stub->movq_rsi[0] = 0x48; /* movq $name,%rsi */
stub->movq_rsi[1] = 0xbe;
stub->movq_rsi[0] = 0x48; /* movq $name,%rdx */
stub->movq_rsi[1] = 0xba;
stub->name = name;
stub->movq_rsp_rdx[0] = 0x48; /* movq (%rsp),%rdx */
stub->movq_rsp_rdx[0] = 0x4c; /* movq (%rsp),%r8 */
stub->movq_rsp_rdx[1] = 0x8b;
stub->movq_rsp_rdx[2] = 0x14;
stub->movq_rsp_rdx[2] = 0x04;
stub->movq_rsp_rdx[3] = 0x24;
stub->movq_rax[0] = 0x48; /* movq $entry, %rax */
stub->movq_rax[1] = 0xb8;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment