kernel32: Remove __wine_kernel_init().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-12-10 11:08:40 +01:00
parent 2e66404dc9
commit 30e5f1215e
4 changed files with 14 additions and 30 deletions

View File

@ -1686,4 +1686,4 @@
@ cdecl wine_get_dos_file_name(str)
# Init code
@ cdecl __wine_kernel_init()
@ cdecl __wine_start_process()

View File

@ -84,6 +84,9 @@ static BOOL process_attach( HMODULE module )
{
RTL_USER_PROCESS_PARAMETERS *params = NtCurrentTeb()->Peb->ProcessParameters;
kernel32_handle = module;
RtlSetUnhandledExceptionFilter( UnhandledExceptionFilter );
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
/* Setup registry timezone information */

View File

@ -104,9 +104,7 @@ __ASM_GLOBAL_FUNC( call_process_entry,
__ASM_CFI(".cfi_same_value %ebp\n\t")
"ret" )
extern void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) DECLSPEC_HIDDEN;
extern void WINAPI start_process_wrapper(void) DECLSPEC_HIDDEN;
__ASM_GLOBAL_FUNC( start_process_wrapper,
__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")
@ -120,16 +118,18 @@ static inline DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry )
{
return entry( peb );
}
static void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb );
#define start_process_wrapper start_process
#endif
/***********************************************************************
* start_process
* __wine_start_process
*
* Startup routine of a new process. Runs on the new process stack.
*/
void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb )
#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
{
BOOL being_debugged;
@ -161,22 +161,6 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb )
}
/***********************************************************************
* __wine_kernel_init
*
* Wine initialisation: load and start the main exe file.
*/
void * CDECL __wine_kernel_init(void)
{
static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2',0};
kernel32_handle = GetModuleHandleW(kernel32W);
RtlSetUnhandledExceptionFilter( UnhandledExceptionFilter );
return start_process_wrapper;
}
/***********************************************************************
* wait_input_idle
*

View File

@ -4237,7 +4237,6 @@ void __wine_process_init(void)
NTSTATUS status;
ANSI_STRING func_name;
UNICODE_STRING nt_name;
void * (CDECL *init_func)(void);
INITIAL_TEB stack;
BOOL suspend;
SIZE_T info_size;
@ -4273,11 +4272,11 @@ void __wine_process_init(void)
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
exit(1);
}
RtlInitAnsiString( &func_name, "__wine_kernel_init" );
RtlInitAnsiString( &func_name, "__wine_start_process" );
if ((status = LdrGetProcedureAddress( wm->ldr.BaseAddress, &func_name,
0, (void **)&init_func )) != STATUS_SUCCESS)
0, (void **)&kernel32_start_process )) != STATUS_SUCCESS)
{
MESSAGE( "wine: could not find __wine_kernel_init in kernel32.dll, status %x\n", status );
MESSAGE( "wine: could not find __wine_start_process in kernel32.dll, status %x\n", status );
exit(1);
}
@ -4323,8 +4322,6 @@ void __wine_process_init(void)
NtTerminateProcess( GetCurrentProcess(), status );
}
kernel32_start_process = init_func();
virtual_set_large_address_space();
/* the main exe needs to be the first in the load order list */