1 #ifndef _MONONET_METADATA_IMAGE_H_
2 #define _MONONET_METADATA_IMAGE_H_
7 typedef struct _MonoImage MonoImage;
23 guint32 rows, row_size;
27 * Tables contain up to 9 columns and the possible sizes of the
28 * fields in the documentation are 1, 2 and 4 bytes. So we
29 * can encode in 2 bits the size.
31 * A 32 bit value can encode the resulting size
33 * The top eight bits encode the number of columns in the table.
34 * we only need 4, but 8 is aligned no shift required.
36 guint32 size_bitfield;
43 const char *assembly_name;
48 gboolean idx_string_wide, idx_guid_wide, idx_blob_wide;
50 MonoStreamHeader heap_strings;
51 MonoStreamHeader heap_us;
52 MonoStreamHeader heap_blob;
53 MonoStreamHeader heap_guid;
54 MonoStreamHeader heap_tables;
58 MonoTableInfo tables [64];
61 * references is initialized only by using the mono_assembly_open
62 * function, and not by using the lowlevel mono_image_open.
64 * It is NULL terminated.
66 MonoAssembly **references;
69 * Indexed by method tokens and typedef tokens.
71 GHashTable *method_cache;
72 GHashTable *class_cache;
74 * Indexes namespaces to hash tables that map class name to typedef token.
76 GHashTable *name_cache;
79 * Indexed by ((rank << 24) | (typedef & 0xffffff)), which limits us to a
82 GHashTable *array_cache;
84 void *reflection_info;
87 * user_info is a public field and is not touched by the
93 enum MonoImageOpenStatus {
95 MONO_IMAGE_ERROR_ERRNO,
96 MONO_IMAGE_MISSING_ASSEMBLYREF,
97 MONO_IMAGE_IMAGE_INVALID
100 MonoImage *mono_image_open (const char *fname,
101 enum MonoImageOpenStatus *status);
102 MonoImage *mono_image_loaded (const char *name);
103 void mono_image_close (MonoImage *image);
104 const char *mono_image_strerror (enum MonoImageOpenStatus status);
106 int mono_image_ensure_section (MonoImage *image,
107 const char *section);
108 int mono_image_ensure_section_idx (MonoImage *image,