2010-02-04 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Thu, 4 Feb 2010 04:03:15 +0000 (04:03 -0000)
committerZoltan Varga <vargaz@gmail.com>
Thu, 4 Feb 2010 04:03:15 +0000 (04:03 -0000)
* aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.

svn path=/trunk/mono/; revision=150822

mono/mini/ChangeLog
mono/mini/aot-compiler.c

index 5b6d85660da7cf88ee3bdb28be295475336baff8..7805b704db394610f7b8435955010912a7d4e742 100755 (executable)
@@ -1,5 +1,7 @@
 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
index c6663fb137c47450f7808428c9a515373e09a7e5..63e8bb1c4dd7cfe4b682d4a679186ea20a1475e0 100644 (file)
@@ -3416,7 +3416,7 @@ emit_plt (MonoAotCompile *acfg)
                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) {
                        /*
@@ -3429,7 +3429,7 @@ emit_plt (MonoAotCompile *acfg)
                        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;
                        }
                }
@@ -4320,7 +4320,7 @@ mono_aot_get_plt_symbol (MonoJumpInfoType type, gconstpointer data)
 
        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*
@@ -5826,6 +5826,8 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                        *p = '_';
        }
 
+       acfg->temp_prefix = img_writer_get_temp_label_prefix (NULL);
+
        acfg->method_index = 1;
 
        collect_methods (acfg);
@@ -5926,8 +5928,6 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                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