From 6213757d9ad83e34f115a8877f6918a7dd39c71b Mon Sep 17 00:00:00 2001 From: "wolfgang.thaller@gmx.net" Date: Sun, 5 Feb 2006 16:26:18 +0000 Subject: [PATCH] Darwin/x86 Mangler: Make sure each imported symbol stub gets a separate chunk. --- ghc/driver/mangler/ghc-asm.lprl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl index bbfe142..18388b5 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 -- 1.7.10.4