1 #ifndef _MONONET_METADATA_IMAGE_H_
2 #define _MONONET_METADATA_IMAGE_H_
7 typedef struct _MonoImage MonoImage;
8 typedef struct _MonoImage MonoMetadata;
24 guint32 rows, row_size;
28 * Tables contain up to 9 columns and the possible sizes of the
29 * fields in the documentation are 1, 2 and 4 bytes. So we
30 * can encode in 2 bits the size.
32 * A 32 bit value can encode the resulting size
34 * The top eight bits encode the number of columns in the table.
35 * we only need 4, but 8 is aligned no shift required.
37 guint32 size_bitfield;
44 const char *assembly_name;
49 gboolean idx_string_wide, idx_guid_wide, idx_blob_wide;
51 MonoStreamHeader heap_strings;
52 MonoStreamHeader heap_us;
53 MonoStreamHeader heap_blob;
54 MonoStreamHeader heap_guid;
55 MonoStreamHeader heap_tables;
59 MonoTableInfo tables [64];
62 * references is initialized only by using the mono_assembly_open
63 * function, and not by using the lowlevel mono_image_open.
65 * It is NULL terminated.
67 MonoAssembly **references;
70 * Indexed by method tokens and typedef tokens.
72 GHashTable *method_cache;
73 GHashTable *class_cache;
75 * Indexes namespaces to hash tables that map class name to typedef token.
77 GHashTable *name_cache;
80 * Indexed by ((rank << 24) | (typedef & 0xffffff)), which limits us to a
83 GHashTable *array_cache;
86 * user_info is a public field and is not touched by the
92 enum MonoImageOpenStatus {
94 MONO_IMAGE_ERROR_ERRNO,
95 MONO_IMAGE_MISSING_ASSEMBLYREF,
96 MONO_IMAGE_IMAGE_INVALID
99 MonoImage *mono_image_open (const char *fname,
100 enum MonoImageOpenStatus *status);
101 void mono_image_close (MonoImage *image);
102 const char *mono_image_strerror (enum MonoImageOpenStatus status);
105 int mono_image_ensure_section (MonoImage *image,
106 const char *section);
107 int mono_image_ensure_section_idx (MonoImage *image,