#define ENABLE_AOT_CACHE
#endif
-#ifdef TARGET_WIN32
-#define SHARED_EXT ".dll"
-#elif ((defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__)) || defined(__MACH__)) && !defined(__linux__)
-#define SHARED_EXT ".dylib"
-#elif defined(__APPLE__) && defined(TARGET_X86) && !defined(__native_client_codegen__)
-#define SHARED_EXT ".dylib"
-#else
-#define SHARED_EXT ".so"
-#endif
-
#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1)))
#define ROUND_DOWN(VALUE,SIZE) ((VALUE) & ~((SIZE) - 1))
*/
hash = get_aot_config_hash (assembly);
- tmp2 = g_strdup_printf ("%s-%s%s", assembly->image->assembly_name, hash, SHARED_EXT);
+ tmp2 = g_strdup_printf ("%s-%s%s", assembly->image->assembly_name, hash, MONO_SOLIB_EXT);
fname = g_build_filename (cache_dir, tmp2, NULL);
*aot_name = fname;
g_free (tmp2);
sofile = aot_cache_load_module (assembly, &aot_name);
if (!sofile) {
char *err;
- aot_name = g_strdup_printf ("%s%s", assembly->image->name, SHARED_EXT);
+ aot_name = g_strdup_printf ("%s%s", assembly->image->name, MONO_SOLIB_EXT);
sofile = mono_dl_open (aot_name, MONO_DL_LAZY, &err);
if (!sofile) {
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module '%s' not found: %s\n", aot_name, err);
g_free (err);
+
+ aot_name = g_strdup_printf ("%s/mono/aot-cache/%s/%s%s", mono_assembly_getrootdir(), ARCHITECTURE, g_path_get_basename (assembly->image->name), MONO_SOLIB_EXT);
+ sofile = mono_dl_open (aot_name, MONO_DL_LAZY, &err);
+ if (!sofile) {
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module '%s' not found: %s\n", aot_name, err);
+ g_free (err);
+ }
+
}
}
}
} else {
num_holes = try_holes_info_size = 0;
}
- /* Exception table */
- if (has_clauses)
- num_clauses = decode_value (p, &p);
- else
- num_clauses = 0;
+
if (has_arch_eh_jit_info) {
flags |= JIT_INFO_HAS_ARCH_EH_INFO;
arch_eh_jit_info_size = sizeof (MonoArchEHJitInfo);
+ /* Overwrite the original code_len which includes alignment padding */
+ code_len = decode_value (p, &p);
} else {
arch_eh_jit_info_size = 0;
}
+ /* Exception table */
+ if (has_clauses)
+ num_clauses = decode_value (p, &p);
+ else
+ num_clauses = 0;
+
if (from_llvm) {
MonoJitExceptionInfo *clauses;
GSList **nesting;