[project @ 2005-04-07 06:25:54 by wolfgang]
authorwolfgang <unknown>
Thu, 7 Apr 2005 06:25:54 +0000 (06:25 +0000)
committerwolfgang <unknown>
Thu, 7 Apr 2005 06:25:54 +0000 (06:25 +0000)
Mac OS X: Work around a subtle bug/strangeness/"feature" in Apple's toolchain
that affects machoInitSymbolsWithoutUnderscore().
(The symbolsWithoutUnderscore symbol must be .globl, otherwise incorrect code
will be generated to refer to it)

This has already been MERGED TO STABLE as part of the previous commit.

ghc/rts/Linker.c

index f57bb5a..9744a34 100644 (file)
@@ -3925,7 +3925,7 @@ static void machoInitSymbolsWithoutUnderscore()
 {
     extern void* symbolsWithoutUnderscore[];
     void **p = symbolsWithoutUnderscore;
-    __asm__ volatile(".data\n_symbolsWithoutUnderscore:");
+    __asm__ volatile(".globl _symbolsWithoutUnderscore\n.data\n_symbolsWithoutUnderscore:");
 
 #undef Sym
 #define Sym(x)  \