remove empty dir
[ghc-hetmet.git] / ghc / driver / mangler / ghc-asm.lprl
index d4f06e0..902593e 100644 (file)
@@ -588,17 +588,28 @@ sub mangle_asm {
                || /^\s*\.section __TEXT,__symbol_stub\d,.*/
                || /^\s*\.section __TEXT,__symbolstub\d,.*/
                || /^\s*\.lazy_symbol_pointer/
-               || /^\s*\.non_lazy_symbol_pointer/ ))
+               || /^\s*\.non_lazy_symbol_pointer/
+               || /^\s*\.section __IMPORT.*/))
        {
            $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' && /^\s*\.align/)
+       {       # non_lazy_symbol_ptrs that point to local symbols
+           $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