* Copyright 2011 Xamarin Inc (http://www.xamarin.com)
*/
-/* Remaining AOT-only work:
- * - optimize the trampolines, generate more code in the arch files.
- * - make things more consistent with how elf works, for example, use ELF
- * relocations.
- * Remaining generics sharing work:
- * - optimize the size of the data which is encoded.
- * - optimize the runtime loading of data:
- * - the trampoline code calls mono_jit_info_table_find () to find the rgctx,
- * which loads the debugging+exception handling info for the method. This is a
- * huge waste of time and code, since the rgctx structure is currently empty.
- */
#include "config.h"
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <errno.h>
#include <sys/stat.h>
-
#include <mono/metadata/abi-details.h>
#include <mono/metadata/tabledefs.h>
#include <mono/metadata/class.h>
g_assert (code - buf == 8);
emit_bytes (acfg, buf, code - buf);
}
+
+ acfg->tramp_page_code_offsets [MONO_AOT_TRAMP_SPECIFIC] = 16;
+ acfg->tramp_page_code_offsets [MONO_AOT_TRAMP_STATIC_RGCTX] = 16;
+ acfg->tramp_page_code_offsets [MONO_AOT_TRAMP_IMT_THUNK] = 72;
+ acfg->tramp_page_code_offsets [MONO_AOT_TRAMP_GSHAREDVT_ARG] = 16;
#elif defined(TARGET_ARM64)
arm64_emit_specific_trampoline_pages (acfg);
#endif
char *name1, *name2, *cached;
int i, j, len, count;
+ name1 = mono_method_full_name (method, TRUE);
+
#ifdef TARGET_MACH
// This is so that we don't accidentally create a local symbol (which starts with 'L')
- if (!prefix || !*prefix)
+ if ((!prefix || !*prefix) && name1 [0] == 'L')
prefix = "_";
#endif
- name1 = mono_method_full_name (method, TRUE);
len = strlen (name1);
name2 = malloc (strlen (prefix) + len + 16);
memcpy (name2, prefix, strlen (prefix));
tempbc = g_strdup_printf ("%s.bc", acfg->tmpbasename);
- mono_llvm_emit_aot_module (tempbc, acfg->final_got_size);
+ mono_llvm_emit_aot_module (tempbc, g_path_get_basename (acfg->image->name), acfg->final_got_size);
g_free (tempbc);
/*