Lines 30-36
Link Here
|
30 |
|
30 |
|
31 |
&collectExports_hppa() if $TargetPlatform =~ /^hppa/; |
31 |
&collectExports_hppa() if $TargetPlatform =~ /^hppa/; |
32 |
&collectExports_mips() if $TargetPlatform =~ /^mips/; |
32 |
&collectExports_mips() if $TargetPlatform =~ /^mips/; |
33 |
&collectDyldStuff_powerpc() if $TargetPlatform =~ /^powerpc-apple/; |
33 |
&collectDyldStuff_powerpc_darwin() if $TargetPlatform =~ /^powerpc-apple-darwin/; |
34 |
|
34 |
|
35 |
$octr = 0; # output file counter |
35 |
$octr = 0; # output file counter |
36 |
$* = 1; # multi-line matches are OK |
36 |
$* = 1; # multi-line matches are OK |
Lines 107-113
Link Here
|
107 |
seek(TMPI, 0, 0); |
107 |
seek(TMPI, 0, 0); |
108 |
} |
108 |
} |
109 |
|
109 |
|
110 |
sub collectDyldStuff_powerpc { # Note: Darwin/PowerPC only |
110 |
sub collectDyldStuff_powerpc_darwin { |
111 |
local($chunk_label,$label,$cur_section,$section,$chunk,$alignment,$cur_alignment); |
111 |
local($chunk_label,$label,$cur_section,$section,$chunk,$alignment,$cur_alignment); |
112 |
|
112 |
|
113 |
%DyldChunks = (); # NB: global table |
113 |
%DyldChunks = (); # NB: global table |
Lines 212-218
Link Here
|
212 |
return(&process_asm_block_alpha($str)) if $TargetPlatform =~ /^alpha-/; |
212 |
return(&process_asm_block_alpha($str)) if $TargetPlatform =~ /^alpha-/; |
213 |
return(&process_asm_block_hppa($str)) if $TargetPlatform =~ /^hppa/; |
213 |
return(&process_asm_block_hppa($str)) if $TargetPlatform =~ /^hppa/; |
214 |
return(&process_asm_block_mips($str)) if $TargetPlatform =~ /^mips-/; |
214 |
return(&process_asm_block_mips($str)) if $TargetPlatform =~ /^mips-/; |
215 |
return(&process_asm_block_powerpc($str)) if $TargetPlatform =~ /^powerpc-apple-/; |
215 |
return(&process_asm_block_powerpc_darwin($str)) |
|
|
216 |
if $TargetPlatform =~ /^powerpc-apple-darwin/; |
217 |
return(&process_asm_block_powerpc_linux($str)) |
218 |
if $TargetPlatform =~ /^powerpc-[^-]+-linux/; |
216 |
|
219 |
|
217 |
# otherwise... |
220 |
# otherwise... |
218 |
&tidy_up_and_die(1,"$Pgm: no process_asm_block for $TargetPlatform\n"); |
221 |
&tidy_up_and_die(1,"$Pgm: no process_asm_block for $TargetPlatform\n"); |
Lines 477-483
Link Here
|
477 |
\end{code} |
480 |
\end{code} |
478 |
|
481 |
|
479 |
\begin{code} |
482 |
\begin{code} |
480 |
sub process_asm_block_powerpc { |
483 |
sub process_asm_block_powerpc_darwin { |
481 |
local($str) = @_; |
484 |
local($str) = @_; |
482 |
local($dyld_stuff) = ''; |
485 |
local($dyld_stuff) = ''; |
483 |
|
486 |
|
Lines 516-522
Link Here
|
516 |
|
519 |
|
517 |
$str .= "\n" . $dyld_stuff; |
520 |
$str .= "\n" . $dyld_stuff; |
518 |
|
521 |
|
519 |
print STDERR "### STRIPPED BLOCK (powerpc):\n$str" if $Dump_asm_splitting_info; |
522 |
print STDERR "### STRIPPED BLOCK (powerpc darwin):\n$str" if $Dump_asm_splitting_info; |
|
|
523 |
|
524 |
$str; |
525 |
} |
526 |
\end{code} |
527 |
|
528 |
\begin{code} |
529 |
sub process_asm_block_powerpc_linux { |
530 |
local($str) = @_; |
531 |
|
532 |
# strip the marker |
533 |
$str =~ s/__stg_split_marker.*\n//; |
534 |
|
535 |
# remove/record any literal constants defined here |
536 |
while ( $str =~ s/^(\s+.section\s+\.rodata\n\s+\.align.*\n(\.LC\d+):\n(\s\.(byte|short|long|quad|2byte|4byte|8byte|fill|space|ascii|string).*\n)+)// ) { |
537 |
local($label) = $2; |
538 |
local($body) = $1; |
539 |
|
540 |
&tidy_up_and_die(1,"Local constant label $label already defined!\n") |
541 |
if $LocalConstant{$label}; |
542 |
|
543 |
$LocalConstant{$label} = $body; |
544 |
} |
545 |
|
546 |
# inject definitions for any local constants now used herein |
547 |
foreach $k (keys %LocalConstant) { |
548 |
if ( $str =~ /[\s,]$k\b/ ) { |
549 |
$str = $LocalConstant{$k} . $str; |
550 |
} |
551 |
} |
552 |
|
553 |
print STDERR "### STRIPPED BLOCK (powerpc linux):\n$str" if $Dump_asm_splitting_info; |
520 |
|
554 |
|
521 |
$str; |
555 |
$str; |
522 |
} |
556 |
} |