Emit .no_dead_strip directives for all LLVM methods on OSX.
authorZoltan Varga <vargaz@gmail.com>
Sat, 8 Jan 2011 17:13:52 +0000 (18:13 +0100)
committerZoltan Varga <vargaz@gmail.com>
Sat, 8 Jan 2011 17:13:52 +0000 (18:13 +0100)
mono/mini/aot-compiler.c

index 71ce74b0799affb94bdbbb1ca71cbb90943fdc0f..9cc359ac2abfe1ec154f3ad88b8a2261d63dc489 100644 (file)
@@ -5277,6 +5277,9 @@ emit_code (MonoAotCompile *acfg)
        /* 
         * Add .no_dead_strip directives for all LLVM methods to prevent the OSX linker
         * from optimizing them away, since it doesn't see that code_offsets references them.
+        * JITted methods don't need this since they are referenced using assembler local
+        * symbols.
+        * FIXME: This is why write-symbols doesn't work on OSX ?
         */
        if (acfg->llvm) {
                fprintf (acfg->fp, "\n");