Commit f99cb329 authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

ntdll: Add zero_bits parameter to load_builtin.

parent 20abf39d
......@@ -1644,7 +1644,7 @@ done:
* Return STATUS_IMAGE_ALREADY_LOADED if we should keep the native one that we have found.
*/
NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename,
void **module, SIZE_T *size )
void **module, SIZE_T *size, ULONG_PTR zero_bits )
{
WORD machine = image_info->machine; /* request same machine as the native one */
NTSTATUS status;
......@@ -1675,9 +1675,9 @@ NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename,
case LO_NATIVE_BUILTIN:
return STATUS_IMAGE_ALREADY_LOADED;
case LO_BUILTIN:
return find_builtin_dll( &nt_name, module, size, &info, 0, machine, FALSE );
return find_builtin_dll( &nt_name, module, size, &info, zero_bits, machine, FALSE );
default:
status = find_builtin_dll( &nt_name, module, size, &info, 0, machine, (loadorder == LO_DEFAULT) );
status = find_builtin_dll( &nt_name, module, size, &info, zero_bits, machine, (loadorder == LO_DEFAULT) );
if (status == STATUS_DLL_NOT_FOUND || status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH)
return STATUS_IMAGE_ALREADY_LOADED;
return status;
......
......@@ -150,7 +150,7 @@ extern void *create_startup_info( const UNICODE_STRING *nt_image, const RTL_USER
extern char **build_envp( const WCHAR *envW ) 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 ) DECLSPEC_HIDDEN;
void **addr_ptr, SIZE_T *size_ptr, ULONG_PTR zero_bits ) DECLSPEC_HIDDEN;
extern BOOL is_builtin_path( const UNICODE_STRING *path, WORD *machine ) DECLSPEC_HIDDEN;
extern NTSTATUS load_main_exe( const WCHAR *name, const char *unix_name, const WCHAR *curdir, WCHAR **image,
void **module ) DECLSPEC_HIDDEN;
......
......@@ -2539,7 +2539,7 @@ static NTSTATUS virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_PTR z
{
filename = (WCHAR *)(image_info + 1);
/* check if we can replace that mapping with the builtin */
res = load_builtin( image_info, filename, addr_ptr, size_ptr );
res = load_builtin( image_info, filename, addr_ptr, size_ptr, zero_bits );
if (res == STATUS_IMAGE_ALREADY_LOADED)
res = virtual_map_image( handle, access, addr_ptr, size_ptr, zero_bits, shared_file,
alloc_type, image_info, filename, FALSE );
......
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