ntdll: Use the SECTION_IMAGE_INFORMATION bitfields where possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
584427fc89
commit
c2c57e8dba
|
@ -1877,12 +1877,12 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
|||
|
||||
/* create the MODREF */
|
||||
|
||||
if (!(wm = alloc_module( *module, nt_name, (image_info->u.ImageFlags & IMAGE_FLAGS_WineBuiltin) )))
|
||||
if (!(wm = alloc_module( *module, nt_name, (image_info->u.s.WineBuiltin) )))
|
||||
return STATUS_NO_MEMORY;
|
||||
|
||||
if (id) wm->id = *id;
|
||||
if (image_info->LoaderFlags) wm->ldr.Flags |= LDR_COR_IMAGE;
|
||||
if (image_info->u.ImageFlags & IMAGE_FLAGS_ComPlusILOnly) wm->ldr.Flags |= LDR_COR_ILONLY;
|
||||
if (image_info->u.s.ComPlusILOnly) wm->ldr.Flags |= LDR_COR_ILONLY;
|
||||
|
||||
set_security_cookie( *module, map_size );
|
||||
|
||||
|
@ -1916,7 +1916,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
|||
|
||||
TRACE( "loaded %s %p %p\n", debugstr_us(nt_name), wm, *module );
|
||||
|
||||
if (image_info->u.ImageFlags & IMAGE_FLAGS_WineBuiltin)
|
||||
if (image_info->u.s.WineBuiltin)
|
||||
{
|
||||
if (TRACE_ON(relay)) RELAY_SetupDLL( *module );
|
||||
}
|
||||
|
@ -1926,7 +1926,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
|||
}
|
||||
|
||||
TRACE_(loaddll)( "Loaded %s at %p: %s\n", debugstr_w(wm->ldr.FullDllName.Buffer), *module,
|
||||
(image_info->u.ImageFlags & IMAGE_FLAGS_WineBuiltin) ? "builtin" : "native" );
|
||||
(image_info->u.s.WineBuiltin) ? "builtin" : "native" );
|
||||
|
||||
wm->ldr.LoadCount = 1;
|
||||
*pwm = wm;
|
||||
|
@ -1946,7 +1946,7 @@ static NTSTATUS build_builtin_module( const WCHAR *load_path, const UNICODE_STRI
|
|||
NTSTATUS status;
|
||||
SECTION_IMAGE_INFORMATION image_info = { 0 };
|
||||
|
||||
image_info.u.ImageFlags = IMAGE_FLAGS_WineBuiltin;
|
||||
image_info.u.s.WineBuiltin = 1;
|
||||
status = build_module( load_path, nt_name, &module, &image_info, NULL, flags, pwm );
|
||||
if (status && module) unix_funcs->unload_builtin_dll( module );
|
||||
return status;
|
||||
|
@ -2062,7 +2062,7 @@ static BOOL is_valid_binary( HANDLE file, const SECTION_IMAGE_INFORMATION *info
|
|||
if (info->Machine == IMAGE_FILE_MACHINE_ARM64) return TRUE;
|
||||
#endif
|
||||
if (!info->ImageContainsCode) return TRUE;
|
||||
if (!(info->u.ImageFlags & IMAGE_FLAGS_ComPlusNativeReady))
|
||||
if (!(info->u.s.ComPlusNativeReady))
|
||||
{
|
||||
IMAGE_COR20_HEADER cor_header;
|
||||
if (!get_cor_header( file, info, &cor_header )) return FALSE;
|
||||
|
@ -2673,7 +2673,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
|
|||
break;
|
||||
|
||||
case STATUS_SUCCESS: /* valid PE file */
|
||||
if (image_info.u.ImageFlags & IMAGE_FLAGS_WineBuiltin)
|
||||
if (image_info.u.s.WineBuiltin)
|
||||
{
|
||||
switch (loadorder)
|
||||
{
|
||||
|
@ -2691,7 +2691,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (!(image_info.u.ImageFlags & IMAGE_FLAGS_WineFakeDll))
|
||||
if (!(image_info.u.s.WineFakeDll))
|
||||
{
|
||||
switch (loadorder)
|
||||
{
|
||||
|
|
|
@ -1225,7 +1225,7 @@ static NTSTATUS open_dll_file( const char *name, OBJECT_ATTRIBUTES *attr, HANDLE
|
|||
|
||||
NtQuerySection( *mapping, SectionImageInformation, image_info, sizeof(*image_info), NULL );
|
||||
/* ignore non-builtins */
|
||||
if (!(image_info->u.ImageFlags & IMAGE_FLAGS_WineBuiltin))
|
||||
if (!(image_info->u.s.WineBuiltin))
|
||||
{
|
||||
WARN( "%s found in WINEDLLPATH but not a builtin, ignoring\n", debugstr_a(name) );
|
||||
status = STATUS_DLL_NOT_FOUND;
|
||||
|
|
|
@ -2490,7 +2490,12 @@ typedef struct _SECTION_IMAGE_INFORMATION {
|
|||
UCHAR ImageMappedFlat : 1;
|
||||
UCHAR BaseBelow4gb : 1;
|
||||
UCHAR ComPlusPrefer32bit : 1;
|
||||
#ifdef __WINESRC__ /* Wine extensions */
|
||||
UCHAR WineBuiltin : 1;
|
||||
UCHAR WineFakeDll : 1;
|
||||
#else
|
||||
UCHAR Reserved : 2;
|
||||
#endif
|
||||
} DUMMYSTRUCTNAME;
|
||||
} DUMMYUNIONNAME;
|
||||
ULONG LoaderFlags;
|
||||
|
|
Loading…
Reference in New Issue