X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Faot-runtime.c;h=115384028f003b2d2bca9677e26e655fb197ce92;hb=5b558abeeb255a3179d4ca6a85617e051c6abd38;hp=9610c7859b29d13a8001d15047d6832016356c99;hpb=45890e8b46ac438d2b8ccc1bd0d74eea31870de1;p=mono.git diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c index 9610c7859b2..115384028f0 100644 --- a/mono/mini/aot-runtime.c +++ b/mono/mini/aot-runtime.c @@ -1036,6 +1036,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data) MonoAotFileInfo *info = NULL; int i, version; guint8 *blob; + gboolean do_load_image = TRUE; if (mono_compile_aot) return; @@ -1262,8 +1263,20 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data) * non-lazily, since we can't handle out-of-date errors later. * The cached class info also depends on the exact assemblies. */ - for (i = 0; i < amodule->image_table_len; ++i) - load_image (amodule, i, FALSE); +#if defined(__native_client__) + /* TODO: Don't 'load_image' on mscorlib due to a */ + /* recursive loading problem. This should be */ + /* removed if mscorlib is loaded from disk. */ + if (strncmp(assembly->aname.name, "mscorlib", 8)) { + do_load_image = TRUE; + } else { + do_load_image = FALSE; + } +#endif + if (do_load_image) { + for (i = 0; i < amodule->image_table_len; ++i) + load_image (amodule, i, FALSE); + } if (amodule->out_of_date) { mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT Module %s is unusable because a dependency is out-of-date.\n", assembly->image->name);