1 #ifndef _MONONET_METADATA_IMAGE_H_
2 #define _MONONET_METADATA_IMAGE_H_
7 typedef struct _MonoImage MonoImage;
8 typedef struct _MonoImage MonoMetadata;
21 guint32 rows, row_size;
25 * Tables contain up to 9 rows and the possible sizes of the
26 * fields in the documentation are 1, 2 and 4 bytes. So we
27 * can encode in 2 bits the size.
29 * A 32 bit value can encode the resulting size
31 * The top eight bits encode the number of columns in the table.
32 * we only need 4, but 8 is aligned no shift required.
34 guint32 size_bitfield;
41 const char *assembly_name;
46 gboolean idx_string_wide, idx_guid_wide, idx_blob_wide;
48 MonoStreamHeader heap_strings;
49 MonoStreamHeader heap_us;
50 MonoStreamHeader heap_blob;
51 MonoStreamHeader heap_guid;
52 MonoStreamHeader heap_tables;
56 MonoTableInfo tables [64];
59 * references is initialized only by using the mono_assembly_open
60 * function, and not by using the lowlevel mono_image_open.
62 * It is NULL terminated.
64 MonoAssembly **references;
67 * Indexed by method tokens and typedef tokens.
69 GHashTable *method_cache;
70 GHashTable *class_cache;
72 * Indexes namespaces to hash tables that map class name to typedef token.
74 GHashTable *name_cache;
77 * Indexed by ((rank << 24) | (typedef & 0xffffff)), which limits us to a
80 GHashTable *array_cache;
83 * user_info is a public field and is not touched by the
89 enum MonoImageOpenStatus {
91 MONO_IMAGE_ERROR_ERRNO,
92 MONO_IMAGE_MISSING_ASSEMBLYREF,
93 MONO_IMAGE_IMAGE_INVALID
96 MonoImage *mono_image_open (const char *fname,
97 enum MonoImageOpenStatus *status);
98 void mono_image_close (MonoImage *image);
99 const char *mono_image_strerror (enum MonoImageOpenStatus status);
102 int mono_image_ensure_section (MonoImage *image,
103 const char *section);
104 int mono_image_ensure_section_idx (MonoImage *image,