server: Add flag for builtin dlls in the image information.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-22 11:34:25 +02:00
parent 11ee7a7051
commit 546fa12755
4 changed files with 8 additions and 3 deletions

View File

@ -3203,7 +3203,7 @@ void virtual_fill_image_information( const pe_image_info_t *pe_info, SECTION_IMA
info->DllCharacteristics = pe_info->dll_charact;
info->Machine = pe_info->machine;
info->ImageContainsCode = pe_info->contains_code;
info->u.ImageFlags = pe_info->image_flags & ~IMAGE_FLAGS_WineFakeDll;
info->u.ImageFlags = pe_info->image_flags & ~(IMAGE_FLAGS_WineBuiltin|IMAGE_FLAGS_WineFakeDll);
info->LoaderFlags = pe_info->loader_flags;
info->ImageFileSize = pe_info->file_size;
info->CheckSum = pe_info->checksum;

View File

@ -720,6 +720,7 @@ typedef struct
#define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
#define IMAGE_FLAGS_ImageMappedFlat 0x08
#define IMAGE_FLAGS_BaseBelow4gb 0x10
#define IMAGE_FLAGS_WineBuiltin 0x40
#define IMAGE_FLAGS_WineFakeDll 0x80
struct rawinput_device

View File

@ -558,6 +558,7 @@ static int load_clr_header( IMAGE_COR20_HEADER *hdr, size_t va, size_t size, int
/* retrieve the mapping parameters for an executable (PE) image */
static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_size, int unix_fd )
{
static const char builtin_signature[] = "Wine builtin DLL";
static const char fakedll_signature[] = "Wine placeholder DLL";
IMAGE_COR20_HEADER clr;
@ -565,7 +566,7 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
struct
{
IMAGE_DOS_HEADER dos;
char buffer[sizeof(fakedll_signature)];
char buffer[32];
} mz;
struct
{
@ -702,7 +703,9 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
mapping->image.gp = 0; /* FIXME */
mapping->image.file_size = file_size;
mapping->image.loader_flags = clr_va && clr_size;
if (mz_size == sizeof(mz) && !memcmp( mz.buffer, fakedll_signature, sizeof(fakedll_signature) ))
if (mz_size == sizeof(mz) && !memcmp( mz.buffer, builtin_signature, sizeof(builtin_signature) ))
mapping->image.image_flags |= IMAGE_FLAGS_WineBuiltin;
else if (mz_size == sizeof(mz) && !memcmp( mz.buffer, fakedll_signature, sizeof(fakedll_signature) ))
mapping->image.image_flags |= IMAGE_FLAGS_WineFakeDll;
/* load the section headers */

View File

@ -736,6 +736,7 @@ typedef struct
#define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
#define IMAGE_FLAGS_ImageMappedFlat 0x08
#define IMAGE_FLAGS_BaseBelow4gb 0x10
#define IMAGE_FLAGS_WineBuiltin 0x40
#define IMAGE_FLAGS_WineFakeDll 0x80
struct rawinput_device