gboolean thumb_mixed, need_no_dead_strip, need_pt_gnu_stack;
GHashTable *ginst_hash;
gboolean global_symbols;
-#ifdef MONOTOUCH
gboolean direct_method_addresses;
-#endif
} MonoAotCompile;
typedef struct {
new_ji = mono_patch_info_dup_mp (acfg->mempool, patch_info);
+ // g_assert (mono_patch_info_equal (patch_info, new_ji));
+
res = mono_mempool_alloc0 (acfg->mempool, sizeof (MonoPltEntry));
res->plt_offset = acfg->plt_offset;
res->ji = new_ji;
char *name1, *name2, *cached;
int i, j, len, count;
+#ifdef TARGET_MACH
+ // This is so that we don't accidentally create a local symbol (which starts with 'L')
+ if (!prefix || !*prefix)
+ prefix = "_";
+#endif
+
name1 = mono_method_full_name (method, TRUE);
len = strlen (name1);
name2 = malloc (strlen (prefix) + len + 16);
case MONO_PATCH_INFO_SIGNATURE:
encode_signature (acfg, (MonoMethodSignature*)patch_info->data.target, p, &p);
break;
+ case MONO_PATCH_INFO_GSHAREDVT_CALL:
+ encode_signature (acfg, (MonoMethodSignature*)patch_info->data.gsharedvt->sig, p, &p);
+ encode_method_ref (acfg, patch_info->data.gsharedvt->method, p, &p);
+ break;
default:
g_warning ("unable to handle jump info %d", patch_info->type);
g_assert_not_reached ();
#ifdef MONO_ARCH_GSHAREDVT_SUPPORTED
mono_arch_get_gsharedvt_trampoline (&info, TRUE);
- emit_trampoline_full (acfg, acfg->got_offset, info, TRUE);
+ if (info) {
+ emit_trampoline_full (acfg, acfg->got_offset, info, TRUE);
- /* Create a separate out trampoline for more information in stack traces */
- info->name = g_strdup ("gsharedvt_out_trampoline");
- emit_trampoline_full (acfg, acfg->got_offset, info, TRUE);
+ /* Create a separate out trampoline for more information in stack traces */
+ info->name = g_strdup ("gsharedvt_out_trampoline");
+ emit_trampoline_full (acfg, acfg->got_offset, info, TRUE);
+ }
#endif
#if defined(MONO_ARCH_HAVE_GET_TRAMPOLINES)
sprintf (symbol, "ut_%d", index);
emit_int32 (acfg, index);
- emit_symbol_diff (acfg, symbol, end_symbol, 0);
+ if (acfg->direct_method_addresses)
+ emit_pointer (acfg, symbol);
+ else
+ emit_symbol_diff (acfg, symbol, end_symbol, 0);
/* Make sure the table is sorted by index */
g_assert (index > prev_index);
prev_index = index;