2010-02-04 Zoltan Varga <vargaz@gmail.com>
+ * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
+
* mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
* mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
char *debug_sym = NULL;
MonoJumpInfo *ji;
- sprintf (label, "%sp_%d", acfg->temp_prefix, i);
+ sprintf (label, "%s%sp_%d", acfg->llvm_label_prefix, acfg->temp_prefix, i);
if (acfg->llvm) {
/*
ji = g_hash_table_lookup (acfg->plt_offset_to_patch, GUINT_TO_POINTER (i));
if (ji && is_direct_callable (acfg, NULL, ji) && !acfg->use_bin_writer) {
MonoCompile *callee_cfg = g_hash_table_lookup (acfg->method_to_cfg, ji->data.method);
- fprintf (acfg->fp, "\n.set %s, .Lm_%x\n", label, get_method_index (acfg, callee_cfg->orig_method));
+ fprintf (acfg->fp, "\n.set %s, %s\n", label, callee_cfg->asm_symbol);
continue;
}
}
offset = get_plt_offset (llvm_acfg, ji);
- return g_strdup_printf (".Lp_%d", offset);
+ return g_strdup_printf ("%sp_%d", llvm_acfg->temp_prefix, offset);
}
MonoJumpInfo*
*p = '_';
}
+ acfg->temp_prefix = img_writer_get_temp_label_prefix (NULL);
+
acfg->method_index = 1;
collect_methods (acfg);
outfile_name = NULL;
}
- acfg->temp_prefix = img_writer_get_temp_label_prefix (acfg->w);
-
/*
* The prefix LLVM likes to put in front of symbol names on darwin.
* The mach-os specs require this for globals, but LLVM puts them in front of all