[PATCH 4/4] ntdll: Add zero_bits parameter to load_builtin.
Brendan Shanks
wine at gitlab.winehq.org
Sat Jun 18 15:53:52 CDT 2022
From: Brendan Shanks <bshanks at codeweavers.com>
Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
---
dlls/ntdll/unix/loader.c | 6 +++---
dlls/ntdll/unix/unix_private.h | 2 +-
dlls/ntdll/unix/virtual.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index a69bf49b705..2fd4acc06b9 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -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;
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 8a213bdc65f..39b667ddd4a 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -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;
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 0f65db69fbb..a93d5b4174a 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -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 );
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/275
More information about the wine-devel
mailing list