* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2009 Novell, Inc (http://www.novell.com)
*
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include <config.h>
#include <stdio.h>
i = ((MonoImageLoader*)image->loader)->load_tables (image);
g_assert (image->heap_guid.data);
- g_assert (image->heap_guid.size >= 16);
- image->guid = mono_guid_to_string ((guint8*)image->heap_guid.data);
+ if (!image->metadata_only) {
+ g_assert (image->heap_guid.size >= 16);
+
+ image->guid = mono_guid_to_string ((guint8*)image->heap_guid.data);
+ } else {
+ /* PPDB files have no guid */
+ guint8 empty_guid [16];
+
+ memset (empty_guid, 0, sizeof (empty_guid));
+
+ image->guid = mono_guid_to_string (empty_guid);
+ }
return i;
}
goto done;
}
- if (image->loader == &pe_loader && !mono_verifier_verify_cli_data (image, &errors))
+ if (image->loader == &pe_loader && !image->metadata_only && !mono_verifier_verify_cli_data (image, &errors))
goto invalid_image;
if (!mono_image_load_cli_data (image))
goto invalid_image;
- if (image->loader == &pe_loader && !mono_verifier_verify_table_data (image, &errors))
+ if (image->loader == &pe_loader && !image->metadata_only && !mono_verifier_verify_table_data (image, &errors))
goto invalid_image;
mono_image_load_names (image);