2 #ifndef __MONO_METADATA_INTERNALS_H__
3 #define __MONO_METADATA_INTERNALS_H__
5 #include "mono/metadata/image.h"
6 #include "mono/metadata/blob.h"
7 #include "mono/metadata/cil-coff.h"
8 #include "mono/metadata/mempool.h"
9 #include "mono/metadata/domain-internals.h"
10 #include "mono/metadata/mono-hash.h"
11 #include "mono/utils/mono-compiler.h"
12 #include "mono/utils/mono-dl.h"
13 #include "mono/utils/monobitset.h"
14 #include "mono/utils/mono-property-hash.h"
15 #include "mono/utils/mono-value-hash.h"
16 #include <mono/utils/mono-error.h>
17 #include "mono/utils/mono-conc-hashtable.h"
21 MonoClass *klass; /* for VALUETYPE and CLASS */
22 MonoType *type; /* for PTR */
23 MonoArrayType *array; /* for ARRAY */
24 MonoMethodSignature *method;
25 MonoGenericParam *generic_param; /* for VAR and MVAR */
26 MonoGenericClass *generic_class; /* for GENERICINST */
28 unsigned int attrs : 16; /* param attributes or field flags */
29 MonoTypeEnum type : 8;
30 unsigned int num_mods : 6; /* max 64 modifiers follow at the end */
31 unsigned int byref : 1;
32 unsigned int pinned : 1; /* valid when included in a local var signature */
33 MonoCustomMod modifiers [MONO_ZERO_LEN_ARRAY]; /* this may grow */
36 #define MONO_SIZEOF_TYPE (offsetof (struct _MonoType, modifiers))
38 #define MONO_SECMAN_FLAG_INIT(x) (x & 0x2)
39 #define MONO_SECMAN_FLAG_GET_VALUE(x) (x & 0x1)
40 #define MONO_SECMAN_FLAG_SET_VALUE(x,y) do { x = ((y) ? 0x3 : 0x2); } while (0)
42 #define MONO_PUBLIC_KEY_TOKEN_LENGTH 17
44 #define MONO_PROCESSOR_ARCHITECTURE_NONE 0
45 #define MONO_PROCESSOR_ARCHITECTURE_MSIL 1
46 #define MONO_PROCESSOR_ARCHITECTURE_X86 2
47 #define MONO_PROCESSOR_ARCHITECTURE_IA64 3
48 #define MONO_PROCESSOR_ARCHITECTURE_AMD64 4
49 #define MONO_PROCESSOR_ARCHITECTURE_ARM 5
51 struct _MonoAssemblyName {
54 const char *hash_value;
55 const mono_byte* public_key;
56 // string of 16 hex chars + 1 NULL
57 mono_byte public_key_token [MONO_PUBLIC_KEY_TOKEN_LENGTH];
61 uint16_t major, minor, build, revision, arch;
64 struct MonoTypeNameParse {
67 MonoAssemblyName assembly;
68 GList *modifiers; /* 0 -> byref, -1 -> pointer, > 0 -> array rank */
69 GPtrArray *type_arguments;
73 struct _MonoAssembly {
75 * The number of appdomains which have this assembly loaded plus the number of
76 * assemblies referencing this assembly through an entry in their image->references
77 * arrays. The latter is needed because entries in the image->references array
78 * might point to assemblies which are only loaded in some appdomains, and without
79 * the additional reference, they can be freed at any time.
80 * The ref_count is initially 0.
82 int ref_count; /* use atomic operations only */
84 MonoAssemblyName aname;
86 GSList *friend_assembly_names; /* Computed by mono_assembly_load_friends () */
87 guint8 friend_assembly_names_inited;
90 guint8 corlib_internal;
92 guint8 wrap_non_exception_throws;
93 guint8 wrap_non_exception_throws_inited;
94 guint8 jit_optimizer_disabled;
95 guint8 jit_optimizer_disabled_inited;
96 /* security manager flags (one bit is for lazy initialization) */
97 guint32 ecma:2; /* Has the ECMA key */
98 guint32 aptc:2; /* Has the [AllowPartiallyTrustedCallers] attributes */
99 guint32 fulltrust:2; /* Has FullTrust permission */
100 guint32 unmanaged:2; /* Has SecurityPermissionFlag.UnmanagedCode permission */
101 guint32 skipverification:2; /* Has SecurityPermissionFlag.SkipVerification permission */
106 * indexed by MonoMethodSignature
107 * Protected by the marshal lock
109 GHashTable *delegate_invoke_cache;
110 GHashTable *delegate_begin_invoke_cache;
111 GHashTable *delegate_end_invoke_cache;
112 GHashTable *runtime_invoke_cache;
113 GHashTable *runtime_invoke_vtype_cache;
114 GHashTable *runtime_invoke_sig_cache;
117 * indexed by SignaturePointerPair
119 GHashTable *delegate_abstract_invoke_cache;
122 * indexed by MonoMethod pointers
123 * Protected by the marshal lock
125 GHashTable *runtime_invoke_direct_cache;
126 GHashTable *managed_wrapper_cache;
128 GHashTable *native_wrapper_cache;
129 GHashTable *native_wrapper_aot_cache;
130 GHashTable *native_wrapper_check_cache;
131 GHashTable *native_wrapper_aot_check_cache;
133 GHashTable *native_func_wrapper_aot_cache;
134 GHashTable *remoting_invoke_cache;
135 GHashTable *synchronized_cache;
136 GHashTable *unbox_wrapper_cache;
137 GHashTable *cominterop_invoke_cache;
138 GHashTable *cominterop_wrapper_cache; /* LOCKING: marshal lock */
139 GHashTable *thunk_invoke_cache;
147 struct _MonoTableInfo {
153 * Tables contain up to 9 columns and the possible sizes of the
154 * fields in the documentation are 1, 2 and 4 bytes. So we
155 * can encode in 2 bits the size.
157 * A 32 bit value can encode the resulting size
159 * The top eight bits encode the number of columns in the table.
160 * we only need 4, but 8 is aligned no shift required.
162 guint32 size_bitfield;
165 #define REFERENCE_MISSING ((gpointer) -1)
167 typedef struct _MonoDllMap MonoDllMap;
170 gboolean (*match) (MonoImage*);
171 gboolean (*load_pe_data) (MonoImage*);
172 gboolean (*load_cli_data) (MonoImage*);
173 gboolean (*load_tables) (MonoImage*);
178 * The number of assemblies which reference this MonoImage though their 'image'
179 * field plus the number of images which reference this MonoImage through their
180 * 'modules' field, plus the number of threads holding temporary references to
181 * this image between calls of mono_image_open () and mono_image_close ().
185 /* If the raw data was allocated from a source such as mmap, the allocator may store resource tracking information here. */
186 void *raw_data_handle;
188 guint32 raw_data_len;
189 guint8 raw_buffer_used : 1;
190 guint8 raw_data_allocated : 1;
191 guint8 fileio_used : 1;
194 /* Module was loaded using LoadLibrary. */
195 guint8 is_module_handle : 1;
197 /* Module entry point is _CorDllMain. */
198 guint8 has_entry_point : 1;
201 /* Whenever this is a dynamically emitted module */
204 /* Whenever this is a reflection only image */
207 /* Whenever this image contains uncompressed metadata */
208 guint8 uncompressed_metadata : 1;
210 /* Whenever this image contains metadata only without PE data */
211 guint8 metadata_only : 1;
213 guint8 checked_module_cctor : 1;
214 guint8 has_module_cctor : 1;
216 guint8 idx_string_wide : 1;
217 guint8 idx_guid_wide : 1;
218 guint8 idx_blob_wide : 1;
220 /* Whenever this image is considered as platform code for the CoreCLR security model */
221 guint8 core_clr_platform_code : 1;
223 /* The path to the file for this image. */
226 /* The assembly name reported in the file for this image (expected to be NULL for a netmodule) */
227 const char *assembly_name;
229 /* The module name reported in the file for this image (could be NULL for a malformed file) */
230 const char *module_name;
233 gint16 md_version_major, md_version_minor;
236 MonoMemPool *mempool; /*protected by the image lock*/
240 MonoStreamHeader heap_strings;
241 MonoStreamHeader heap_us;
242 MonoStreamHeader heap_blob;
243 MonoStreamHeader heap_guid;
244 MonoStreamHeader heap_tables;
245 MonoStreamHeader heap_pdb;
247 const char *tables_base;
250 MonoTableInfo tables [MONO_TABLE_NUM];
253 * references is initialized only by using the mono_assembly_open
254 * function, and not by using the lowlevel mono_image_open.
256 * It is NULL terminated.
258 MonoAssembly **references;
261 /* Code files in the assembly. */
263 guint32 module_count;
264 gboolean *modules_loaded;
267 * Files in the assembly. Items are either NULL or alias items in modules, so this does not impact ref_count.
268 * Protected by the image lock.
275 * The Assembly this image was loaded from.
277 MonoAssembly *assembly;
280 * Indexed by method tokens and typedef tokens.
282 GHashTable *method_cache; /*protected by the image lock*/
283 MonoInternalHashTable class_cache;
285 /* Indexed by memberref + methodspec tokens */
286 GHashTable *methodref_cache; /*protected by the image lock*/
289 * Indexed by fielddef and memberref tokens
291 MonoConcurrentHashTable *field_cache; /*protected by the image lock*/
293 /* indexed by typespec tokens. */
294 GHashTable *typespec_cache; /* protected by the image lock */
295 /* indexed by token */
296 GHashTable *memberref_signatures;
297 GHashTable *helper_signatures;
299 /* Indexed by blob heap indexes */
300 GHashTable *method_signatures;
303 * Indexes namespaces to hash tables that map class name to typedef token.
305 GHashTable *name_cache; /*protected by the image lock*/
308 * Indexed by MonoClass
310 GHashTable *array_cache;
311 GHashTable *ptr_cache;
313 GHashTable *szarray_cache;
314 /* This has a separate lock to improve scalability */
315 mono_mutex_t szarray_cache_lock;
318 * indexed by SignaturePointerPair
320 GHashTable *delegate_bound_static_invoke_cache;
321 GHashTable *native_func_wrapper_cache;
324 * indexed by MonoMethod pointers
326 GHashTable *runtime_invoke_vcall_cache;
327 GHashTable *wrapper_param_names;
328 GHashTable *array_accessor_cache;
331 * indexed by MonoClass pointers
333 GHashTable *ldfld_wrapper_cache;
334 GHashTable *ldflda_wrapper_cache;
335 GHashTable *stfld_wrapper_cache;
336 GHashTable *isinst_cache;
337 GHashTable *castclass_cache;
338 GHashTable *proxy_isinst_cache;
339 GHashTable *rgctx_template_hash; /* LOCKING: templates lock */
341 /* Contains rarely used fields of runtime structures belonging to this image */
342 MonoPropertyHash *property_hash;
344 void *reflection_info;
347 * user_info is a public field and is not touched by the
352 /* dll map entries */
355 /* interfaces IDs from this image */
356 /* protected by the classes lock */
357 MonoBitSet *interface_bitset;
359 /* when the image is being closed, this is abused as a list of
360 malloc'ed regions to be freed. */
361 GSList *reflection_info_unregister_classes;
363 /* List of dependent image sets containing this image */
364 /* Protected by image_sets_lock */
367 /* Caches for wrappers that DO NOT reference generic */
369 MonoWrapperCaches wrapper_caches;
371 /* Caches for MonoClass-es representing anon generic params */
372 MonoClass **var_cache_fast;
373 MonoClass **mvar_cache_fast;
374 GHashTable *var_cache_slow;
375 GHashTable *mvar_cache_slow;
376 GHashTable *var_cache_constrained;
377 GHashTable *mvar_cache_constrained;
379 /* Maps malloc-ed char* pinvoke scope -> MonoDl* */
380 GHashTable *pinvoke_scopes;
382 /* Maps malloc-ed char* pinvoke scope -> malloced-ed char* filename */
383 GHashTable *pinvoke_scope_filenames;
385 /* Indexed by MonoGenericParam pointers */
386 GHashTable **gshared_types;
387 /* The length of the above array */
388 int gshared_types_len;
390 /* The loader used to load this image */
391 MonoImageLoader *loader;
393 // Containers for MonoGenericParams associated with this image but not with any specific class or method. Created on demand.
394 // This could happen, for example, for MonoTypes associated with TypeSpec table entries.
395 MonoGenericContainer *anonymous_generic_class_container;
396 MonoGenericContainer *anonymous_generic_method_container;
399 * No other runtime locks must be taken while holding this lock.
400 * It's meant to be used only to mutate and query structures part of this image.
406 * Generic instances depend on many images, and they need to be deleted if one
407 * of the images they depend on is unloaded. For example,
408 * List<Foo> depends on both List's image and Foo's image.
409 * A MonoImageSet is the owner of all generic instances depending on the same set of
416 // Generic-specific caches
417 GHashTable *gclass_cache, *ginst_cache, *gmethod_cache, *gsignature_cache;
419 MonoWrapperCaches wrapper_caches;
424 * Memory for generic instances owned by this image set should be allocated from
425 * this mempool, using the mono_image_set_alloc family of functions.
427 MonoMemPool *mempool;
440 guint32 alloc_size; /* malloced bytes */
442 guint32 offset; /* from start of metadata */
448 guint8 row_size; /* calculated later with column_sizes */
451 guint32 *values; /* rows * columns */
454 /* "Dynamic" assemblies and images arise from System.Reflection.Emit */
455 struct _MonoDynamicAssembly {
456 MonoAssembly assembly;
458 guint32 strong_name_size;
464 struct _MonoDynamicImage {
468 guint32 metadata_rva;
470 guint32 cli_header_offset;
474 guint32 imp_names_offset;
480 } sections [MONO_SECTION_MAX];
481 GHashTable *typespec;
483 GHashTable *handleref;
484 MonoGHashTable *handleref_managed;
485 MonoGHashTable *tokens;
486 GHashTable *blob_cache;
487 GHashTable *standalonesig_cache;
488 GList *array_methods;
489 GPtrArray *gen_params;
490 MonoGHashTable *token_fixups;
491 GHashTable *method_to_table_idx;
492 GHashTable *field_to_table_idx;
493 GHashTable *method_aux_hash;
494 GHashTable *vararg_aux_hash;
495 MonoGHashTable *generic_def_objects;
496 MonoGHashTable *methodspec;
498 * Maps final token values to the object they describe.
500 MonoGHashTable *remapped_tokens;
503 gboolean initial_image;
504 guint32 pe_kind, machine;
506 guint32 strong_name_size;
508 guint32 win32_res_size;
511 MonoDynamicStream sheap;
512 MonoDynamicStream code; /* used to store method headers and bytecode */
513 MonoDynamicStream resources; /* managed embedded resources */
514 MonoDynamicStream us;
515 MonoDynamicStream blob;
516 MonoDynamicStream tstream;
517 MonoDynamicStream guid;
518 MonoDynamicTable tables [MONO_TABLE_NUM];
519 MonoClass *wrappers_type; /*wrappers are bound to this type instead of <Module>*/
522 /* Contains information about assembly binding */
523 typedef struct _MonoAssemblyBindingInfo {
526 guchar public_key_token [MONO_PUBLIC_KEY_TOKEN_LENGTH];
529 AssemblyVersionSet old_version_bottom;
530 AssemblyVersionSet old_version_top;
531 AssemblyVersionSet new_version;
532 guint has_old_version_bottom : 1;
533 guint has_old_version_top : 1;
534 guint has_new_version : 1;
536 gint32 domain_id; /*Needed to unload per-domain binding*/
537 } MonoAssemblyBindingInfo;
539 struct _MonoMethodHeader {
540 const unsigned char *code;
541 #ifdef MONO_SMALL_CONFIG
546 guint16 max_stack : 15;
547 unsigned int is_transient: 1; /* mono_metadata_free_mh () will actually free this header */
548 unsigned int num_clauses : 15;
549 /* if num_locals != 0, then the following apply: */
550 unsigned int init_locals : 1;
552 MonoExceptionClause *clauses;
553 MonoType *locals [MONO_ZERO_LEN_ARRAY];
558 gboolean has_clauses;
559 } MonoMethodHeaderSummary;
561 #define MONO_SIZEOF_METHOD_HEADER (sizeof (struct _MonoMethodHeader) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
563 struct _MonoMethodSignature {
565 #ifdef MONO_SMALL_CONFIG
568 unsigned int generic_param_count : 5;
572 unsigned int generic_param_count : 16;
574 unsigned int call_convention : 6;
575 unsigned int hasthis : 1;
576 unsigned int explicit_this : 1;
577 unsigned int pinvoke : 1;
578 unsigned int is_inflated : 1;
579 unsigned int has_type_parameters : 1;
580 MonoType *params [MONO_ZERO_LEN_ARRAY];
584 * AOT cache configuration loaded from config files.
585 * Doesn't really belong here.
589 * Enable aot caching for applications whose main assemblies are in
595 } MonoAotCacheConfig;
597 #define MONO_SIZEOF_METHOD_SIGNATURE (sizeof (struct _MonoMethodSignature) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
599 static inline gboolean
600 image_is_dynamic (MonoImage *image)
602 #ifdef DISABLE_REFLECTION_EMIT
605 return image->dynamic;
609 static inline gboolean
610 assembly_is_dynamic (MonoAssembly *assembly)
612 #ifdef DISABLE_REFLECTION_EMIT
615 return assembly->dynamic;
619 /* for use with allocated memory blocks (assumes alignment is to 8 bytes) */
620 guint mono_aligned_addr_hash (gconstpointer ptr);
623 mono_image_check_for_module_cctor (MonoImage *image);
626 mono_image_alloc (MonoImage *image, guint size);
629 mono_image_alloc0 (MonoImage *image, guint size);
631 #define mono_image_new0(image,type,size) ((type *) mono_image_alloc0 (image, sizeof (type)* (size)))
634 mono_image_strdup (MonoImage *image, const char *s);
637 g_list_prepend_image (MonoImage *image, GList *list, gpointer data);
640 g_slist_append_image (MonoImage *image, GSList *list, gpointer data);
643 mono_image_lock (MonoImage *image);
646 mono_image_unlock (MonoImage *image);
649 mono_image_property_lookup (MonoImage *image, gpointer subject, guint32 property);
652 mono_image_property_insert (MonoImage *image, gpointer subject, guint32 property, gpointer value);
655 mono_image_property_remove (MonoImage *image, gpointer subject);
658 mono_image_close_except_pools (MonoImage *image);
661 mono_image_close_finish (MonoImage *image);
663 typedef void (*MonoImageUnloadFunc) (MonoImage *image, gpointer user_data);
666 mono_install_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data);
669 mono_remove_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data);
672 mono_install_image_loader (const MonoImageLoader *loader);
675 mono_image_append_class_to_reflection_info_set (MonoClass *klass);
678 mono_image_set_alloc (MonoImageSet *set, guint size);
681 mono_image_set_alloc0 (MonoImageSet *set, guint size);
684 mono_image_set_lock (MonoImageSet *set);
687 mono_image_set_unlock (MonoImageSet *set);
690 mono_image_set_strdup (MonoImageSet *set, const char *s);
692 #define mono_image_set_new0(image,type,size) ((type *) mono_image_set_alloc0 (image, sizeof (type)* (size)))
695 mono_image_load_cli_header (MonoImage *image, MonoCLIImageInfo *iinfo);
698 mono_image_load_metadata (MonoImage *image, MonoCLIImageInfo *iinfo);
701 mono_metadata_get_shared_type (MonoType *type);
704 mono_metadata_clean_for_image (MonoImage *image);
707 mono_metadata_clean_generic_classes_for_image (MonoImage *image);
710 mono_metadata_cleanup (void);
712 const char * mono_meta_table_name (int table);
713 void mono_metadata_compute_table_bases (MonoImage *meta);
716 mono_metadata_interfaces_from_typedef_full (MonoImage *image,
718 MonoClass ***interfaces,
720 gboolean heap_alloc_result,
721 MonoGenericContext *context,
724 MONO_API MonoMethodSignature *
725 mono_metadata_parse_method_signature_full (MonoImage *image,
726 MonoGenericContainer *generic_container,
732 MONO_API MonoMethodHeader *
733 mono_metadata_parse_mh_full (MonoImage *image,
734 MonoGenericContainer *container,
739 mono_method_get_header_summary (MonoMethod *method, MonoMethodHeaderSummary *summary);
741 int* mono_metadata_get_param_attrs (MonoImage *m, int def, int param_count);
742 gboolean mono_metadata_method_has_param_attrs (MonoImage *m, int def);
745 mono_metadata_generic_context_hash (const MonoGenericContext *context);
748 mono_metadata_generic_context_equal (const MonoGenericContext *g1,
749 const MonoGenericContext *g2);
752 mono_metadata_parse_generic_inst (MonoImage *image,
753 MonoGenericContainer *container,
760 mono_metadata_get_generic_inst (int type_argc,
761 MonoType **type_argv);
764 mono_metadata_lookup_generic_class (MonoClass *gclass,
765 MonoGenericInst *inst,
766 gboolean is_dynamic);
768 MonoGenericInst * mono_metadata_inflate_generic_inst (MonoGenericInst *ginst, MonoGenericContext *context, MonoError *error);
771 mono_metadata_generic_param_hash (MonoGenericParam *p);
774 mono_metadata_generic_param_equal (MonoGenericParam *p1, MonoGenericParam *p2);
776 void mono_dynamic_stream_reset (MonoDynamicStream* stream);
777 void mono_assembly_addref (MonoAssembly *assembly);
778 void mono_assembly_load_friends (MonoAssembly* ass);
779 gboolean mono_assembly_has_skip_verification (MonoAssembly* ass);
781 void mono_assembly_release_gc_roots (MonoAssembly *assembly);
782 gboolean mono_assembly_close_except_image_pools (MonoAssembly *assembly);
783 void mono_assembly_close_finish (MonoAssembly *assembly);
786 gboolean mono_public_tokens_are_equal (const unsigned char *pubt1, const unsigned char *pubt2);
788 void mono_config_parse_publisher_policy (const char *filename, MonoAssemblyBindingInfo *binding_info);
789 void mono_config_parse_assembly_bindings (const char *filename, int major, int minor, void *user_data,
790 void (*infocb)(MonoAssemblyBindingInfo *info, void *user_data));
793 mono_assembly_name_parse_full (const char *name,
794 MonoAssemblyName *aname,
795 gboolean save_public_key,
796 gboolean *is_version_defined,
797 gboolean *is_token_defined);
799 MONO_API guint32 mono_metadata_get_generic_param_row (MonoImage *image, guint32 token, guint32 *owner);
801 void mono_unload_interface_ids (MonoBitSet *bitset);
804 MonoType *mono_metadata_type_dup (MonoImage *image, const MonoType *original);
805 MonoMethodSignature *mono_metadata_signature_dup_full (MonoImage *image,MonoMethodSignature *sig);
806 MonoMethodSignature *mono_metadata_signature_dup_mempool (MonoMemPool *mp, MonoMethodSignature *sig);
807 MonoMethodSignature *mono_metadata_signature_dup_add_this (MonoImage *image, MonoMethodSignature *sig, MonoClass *klass);
810 mono_get_shared_generic_inst (MonoGenericContainer *container);
813 mono_type_stack_size_internal (MonoType *t, int *align, gboolean allow_open);
815 MONO_API void mono_type_get_desc (GString *res, MonoType *type, mono_bool include_namespace);
818 mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_only);
821 mono_metadata_parse_marshal_spec_full (MonoImage *image, MonoImage *parent_image, const char *ptr);
823 guint mono_metadata_generic_inst_hash (gconstpointer data);
824 gboolean mono_metadata_generic_inst_equal (gconstpointer ka, gconstpointer kb);
827 mono_metadata_field_info_with_mempool (
832 MonoMarshalSpec **marshal_spec);
835 mono_metadata_get_corresponding_field_from_generic_type_definition (MonoClassField *field);
838 mono_metadata_get_corresponding_event_from_generic_type_definition (MonoEvent *event);
841 mono_metadata_get_corresponding_property_from_generic_type_definition (MonoProperty *property);
844 mono_metadata_signature_size (MonoMethodSignature *sig);
846 guint mono_metadata_str_hash (gconstpointer v1);
848 gboolean mono_image_load_pe_data (MonoImage *image);
850 gboolean mono_image_load_cli_data (MonoImage *image);
852 void mono_image_load_names (MonoImage *image);
854 MonoImage *mono_image_open_raw (const char *fname, MonoImageOpenStatus *status);
856 MonoImage *mono_image_open_metadata_only (const char *fname, MonoImageOpenStatus *status);
858 MonoImage *mono_image_open_from_data_internal (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, gboolean metadata_only, const char *name);
860 MonoException *mono_get_exception_field_access_msg (const char *msg);
862 MonoException *mono_get_exception_method_access_msg (const char *msg);
864 MonoMethod* method_from_method_def_or_ref (MonoImage *m, guint32 tok, MonoGenericContext *context, MonoError *error);
866 MonoMethod *mono_get_method_constrained_with_method (MonoImage *image, MonoMethod *method, MonoClass *constrained_class, MonoGenericContext *context, MonoError *error);
867 MonoMethod *mono_get_method_constrained_checked (MonoImage *image, guint32 token, MonoClass *constrained_class, MonoGenericContext *context, MonoMethod **cil_method, MonoError *error);
869 void mono_type_set_alignment (MonoTypeEnum type, int align);
871 MonoAotCacheConfig *mono_get_aot_cache_config (void);
873 mono_type_create_from_typespec_checked (MonoImage *image, guint32 type_spec, MonoError *error);
876 mono_method_get_signature_checked (MonoMethod *method, MonoImage *image, guint32 token, MonoGenericContext *context, MonoError *error);
879 mono_get_method_checked (MonoImage *image, guint32 token, MonoClass *klass, MonoGenericContext *context, MonoError *error);
882 mono_metadata_localscope_from_methoddef (MonoImage *meta, guint32 index);
885 mono_wrapper_caches_free (MonoWrapperCaches *cache);
888 mono_method_get_wrapper_cache (MonoMethod *method);
891 mono_method_get_wrapper_cache (MonoMethod *method);
894 mono_metadata_parse_type_checked (MonoImage *m, MonoGenericContainer *container, short opt_attrs, gboolean transient, const char *ptr, const char **rptr, MonoError *error);
896 MonoGenericContainer *
897 get_anonymous_container_for_image (MonoImage *image, gboolean is_mvar);
900 mono_image_set_description (MonoImageSet *);
903 mono_find_image_set_owner (void *ptr);
905 #endif /* __MONO_METADATA_INTERNALS_H__ */