X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mono%2Fmini%2Faot-compiler.c;h=44812084153173ded322f433b649682b9cae6fe0;hb=d66079267a8b8fb7bdc855fd305f0ecb63952b71;hp=4b53f0cae197a61f4991636cd2179bafe4f0b333;hpb=c265540e7615efb3a02fc073f6c4fd8395c54e4a;p=mono.git diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index 4b53f0cae19..44812084153 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -10,17 +10,6 @@ * 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 #ifdef HAVE_UNISTD_H @@ -42,7 +31,6 @@ #include #include - #include #include #include @@ -1274,6 +1262,11 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) 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 @@ -4879,13 +4872,14 @@ get_debug_sym (MonoMethod *method, const char *prefix, GHashTable *cache) 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)); @@ -7109,7 +7103,7 @@ emit_llvm_file (MonoAotCompile *acfg) 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); /*