Darwin/x86 Mangler: Make sure each imported symbol stub gets a separate chunk.
authorwolfgang.thaller@gmx.net <unknown>
Sun, 5 Feb 2006 16:26:18 +0000 (16:26 +0000)
committerwolfgang.thaller@gmx.net <unknown>
Sun, 5 Feb 2006 16:26:18 +0000 (16:26 +0000)
ghc/driver/mangler/ghc-asm.lprl

index bbfe142..18388b5 100644 (file)
@@ -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