summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfgang.thaller@gmx.net <unknown>2006-02-05 16:26:18 +0000
committerwolfgang.thaller@gmx.net <unknown>2006-02-05 16:26:18 +0000
commit6213757d9ad83e34f115a8877f6918a7dd39c71b (patch)
treed224aac0140ce40484d269c6856a730fb7818d74
parentcebb894ad0c952c78de4774ddd3b71477d0f2327 (diff)
downloadhaskell-6213757d9ad83e34f115a8877f6918a7dd39c71b.tar.gz
Darwin/x86 Mangler: Make sure each imported symbol stub gets a separate chunk.
-rw-r--r--ghc/driver/mangler/ghc-asm.lprl7
1 files changed, 7 insertions, 0 deletions
diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl
index bbfe142aa7..18388b5802 100644
--- a/ghc/driver/mangler/ghc-asm.lprl
+++ b/ghc/driver/mangler/ghc-asm.lprl
@@ -594,12 +594,19 @@ sub mangle_asm {
$chk[++$i] = $_;
$chkcat[$i] = 'dyld';
$chksymb[$i] = '';
+ $dyld_section = $_;
} elsif ( $TargetPlatform =~ /^.*-apple-darwin.*/ && $chkcat[$i] eq 'dyld' && /^\s*\.data/)
{ # non_lazy_symbol_ptrs that point to local symbols
$chk[++$i] = $_;
$chkcat[$i] = 'dyld';
$chksymb[$i] = '';
+ $dyld_section = $_;
+ } elsif ( $TargetPlatform =~ /^.*-apple-darwin.*/ && $chkcat[$i] eq 'dyld' && /^L_.*:$/)
+ { # non_lazy_symbol_ptrs that point to local symbols
+ $chk[++$i] = $dyld_section . $_;
+ $chkcat[$i] = 'dyld';
+ $chksymb[$i] = '';
} elsif ( /^\s+/ ) { # most common case first -- a simple line!
# duplicated from the bottom