Module: wine Branch: master Commit: f7e4fd0cf8f5237614474a6e5dcdad24a6a1dcdd URL: https://source.winehq.org/git/wine.git/?a=commit;h=f7e4fd0cf8f5237614474a6e5...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Sep 1 13:02:47 2020 +0200
kernel32: Remove the no longer used __wine_start_process() function.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/kernel32.spec | 3 -- dlls/kernel32/process.c | 75 --------------------------------------------- dlls/ntdll/loader.c | 8 ----- 3 files changed, 86 deletions(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index e1c1319375..0111f0e446 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1693,6 +1693,3 @@ # Unix files @ cdecl wine_get_unix_file_name(wstr) @ cdecl wine_get_dos_file_name(str) - -# Init code -@ cdecl -norelay -private __wine_start_process() diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 9d725e1a43..ff4e79ff2b 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -59,7 +59,6 @@ #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(process); -WINE_DECLARE_DEBUG_CHANNEL(relay);
typedef struct { @@ -85,80 +84,6 @@ const WCHAR DIR_System[] = {'C',':','\','w','i','n','d','o','w','s', #define PDB32_WIN32S_PROC 0x8000 /* Win32s process */
-#ifdef __i386__ -extern DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry ); -__ASM_GLOBAL_FUNC( call_process_entry, - "pushl %ebp\n\t" - __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") - __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") - "movl %esp,%ebp\n\t" - __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") - "pushl %ebx\n\t" - __ASM_CFI(".cfi_rel_offset %ebx,-4\n\t") - "movl 8(%ebp),%ebx\n\t" - /* deliberately mis-align the stack by 8, Doom 3 needs this */ - "pushl 4(%ebp)\n\t" /* Driller expects readable address at this offset */ - "pushl 4(%ebp)\n\t" - "pushl %ebx\n\t" - "call *12(%ebp)\n\t" - "leal -4(%ebp),%esp\n\t" - "popl %ebx\n\t" - __ASM_CFI(".cfi_same_value %ebx\n\t") - "popl %ebp\n\t" - __ASM_CFI(".cfi_def_cfa %esp,4\n\t") - __ASM_CFI(".cfi_same_value %ebp\n\t") - "ret" ) - -__ASM_GLOBAL_FUNC( __wine_start_process, - "pushl %ebp\n\t" - __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") - __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") - "movl %esp,%ebp\n\t" - __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") - "pushl %ebx\n\t" /* arg */ - "pushl %eax\n\t" /* entry */ - "call " __ASM_NAME("start_process") ) -#else -static inline DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry ) -{ - return entry( peb ); -} -#endif - -/*********************************************************************** - * __wine_start_process - * - * Startup routine of a new process. Runs on the new process stack. - */ -#ifdef __i386__ -void CDECL start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) -#else -void CDECL __wine_start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) -#endif -{ - if (!entry) - { - ERR( "%s doesn't have an entry point, it cannot be executed\n", - debugstr_w(peb->ProcessParameters->ImagePathName.Buffer) ); - ExitThread( 1 ); - } - - TRACE_(relay)( "\1Starting process %s (entryproc=%p)\n", - debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry ); - - __TRY - { - ExitThread( call_process_entry( peb, entry )); - } - __EXCEPT(UnhandledExceptionFilter) - { - TerminateProcess( GetCurrentProcess(), GetExceptionCode() ); - } - __ENDTRY - abort(); /* should not be reached */ -} - - /*********************************************************************** * wait_input_idle * diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 6d2115644f..96fa0566cf 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -59,7 +59,6 @@ typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID); typedef void (CALLBACK *LDRENUMPROC)(LDR_DATA_TABLE_ENTRY *, void *, BOOLEAN *);
void (FASTCALL *pBaseThreadInitThunk)(DWORD,LPTHREAD_START_ROUTINE,void *) = NULL; -static void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void *);
const struct unix_funcs *unix_funcs = NULL;
@@ -4002,13 +4001,6 @@ static void process_init(void) MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); NtTerminateProcess( GetCurrentProcess(), status ); } - RtlInitAnsiString( &func_name, "__wine_start_process" ); - if ((status = LdrGetProcedureAddress( wm->ldr.DllBase, &func_name, - 0, (void **)&kernel32_start_process )) != STATUS_SUCCESS) - { - MESSAGE( "wine: could not find __wine_start_process in kernel32.dll, status %x\n", status ); - NtTerminateProcess( GetCurrentProcess(), status ); - } RtlInitAnsiString( &func_name, "BaseThreadInitThunk" ); if ((status = LdrGetProcedureAddress( wm->ldr.DllBase, &func_name, 0, (void **)&pBaseThreadInitThunk )) != STATUS_SUCCESS)