Commit e588e218 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Only fall back to start.exe when using a different loader.

parent bdc11ee0
......@@ -1932,8 +1932,15 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
status = load_main_exe( NULL, main_argv[1], curdir, &image, module );
if (!status)
{
char *loader;
if (main_image_info.ImageCharacteristics & IMAGE_FILE_DLL) status = STATUS_INVALID_IMAGE_FORMAT;
if (main_image_info.Machine != current_machine) status = STATUS_INVALID_IMAGE_FORMAT;
/* if we have to use a different loader, fall back to start.exe */
if ((loader = get_alternate_wineloader( main_image_info.Machine )))
{
free( loader );
status = STATUS_INVALID_IMAGE_FORMAT;
}
}
if (status) /* try launching it through start.exe */
......
......@@ -656,7 +656,7 @@ static void init_paths( char *argv[] )
/***********************************************************************
* get_alternate_wineloader
*/
static char *get_alternate_wineloader( WORD machine )
char *get_alternate_wineloader( WORD machine )
{
char *ret = NULL;
......
......@@ -175,6 +175,7 @@ extern void init_startup_info(void) DECLSPEC_HIDDEN;
extern void *create_startup_info( const UNICODE_STRING *nt_image, const RTL_USER_PROCESS_PARAMETERS *params,
DWORD *info_size ) DECLSPEC_HIDDEN;
extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN;
extern char *get_alternate_wineloader( WORD machine ) DECLSPEC_HIDDEN;
extern NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_info ) DECLSPEC_HIDDEN;
extern NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename,
void **addr_ptr, SIZE_T *size_ptr, ULONG_PTR zero_bits ) DECLSPEC_HIDDEN;
......
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