From: simonmar Date: Fri, 18 Feb 2005 09:32:50 +0000 (+0000) Subject: [project @ 2005-02-18 09:32:50 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1056 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=1e14e21aa34a38a208caac75020ac9daf87b1e0f [project @ 2005-02-18 09:32:50 by simonmar] Mac OS X: fixes to the splitter (rev. 1.24.6.1 on the branch) --- diff --git a/ghc/driver/split/ghc-split.lprl b/ghc/driver/split/ghc-split.lprl index 6939240..1f8acfa 100644 --- a/ghc/driver/split/ghc-split.lprl +++ b/ghc/driver/split/ghc-split.lprl @@ -124,12 +124,11 @@ sub collectDyldStuff_powerpc_darwin { $_ = ; if ( $_ eq '' || /^L(_.+)\$.+:/ ) { if ( $label ne '' ) { - $DyldChunksDefined{$label} .= $section . $chunk_label . $alignment . $ chunk; + $DyldChunksDefined{$label} .= $section . $alignment . $chunk_label . $ chunk; if( $section =~ s/\.data/\.non_lazy_symbol_pointer/ ) { $chunk = "\t.indirect_symbol $label\n\t.long 0\n"; } - $DyldChunks{$label} .= $section . $chunk_label . $chunk; - # don't use $alignment, it's only needed for .data, which we change into .non_lazy_symbol_pointer + $DyldChunks{$label} .= $section . $alignment . $chunk_label . $chunk; print STDERR "### dyld chunk: $label\n$section$alignment$chunk\n###\n" if $Dump_asm_splitting_info; } last if ($_ eq ''); @@ -147,7 +146,8 @@ sub collectDyldStuff_powerpc_darwin { } elsif ( /^\s*\.section\s+__TEXT,__symbol_stub1,symbol_stubs,pure_instructions,\d+/ ) { $cur_section = $_; printf STDERR "section: $cur_section\n" if $Dump_asm_splitting_info; - $cur_alignment = '' + # always make sure we align things + $cur_alignment = '\t.align 2' } elsif ( /^\s*\.align.*/ ) { $cur_alignment = $_; printf STDERR "alignment: $cur_alignment\n" if $Dump_asm_splitting_info; @@ -490,7 +490,7 @@ sub process_asm_block_powerpc_darwin { $str =~ s/L_.*\$.*:\n(.|\n)*//; # remove/record any literal constants defined here - while ( $str =~ s/^(\s+.const_data\n\s+\.align.*\n(LC\d+):\n(\s\.(byte|short|long|fill|space|ascii).*\n)+)// ) { + while ( $str =~ s/^(\s+.const.*\n\s+\.align.*\n(LC\d+):\n(\s\.(byte|short|long|fill|space|ascii).*\n)+)// ) { local($label) = $2; local($body) = $1;