From a1d020f74e0702791d2d4cbad5a69bcc2adfecfc Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 14 Oct 2002 07:21:51 +0000 Subject: Kill the now redundant initfini.pl -Erik --- extra/scripts/initfini.pl | 156 ---------------------------------------------- 1 file changed, 156 deletions(-) delete mode 100755 extra/scripts/initfini.pl diff --git a/extra/scripts/initfini.pl b/extra/scripts/initfini.pl deleted file mode 100755 index 3d62a2257..000000000 --- a/extra/scripts/initfini.pl +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/perl - -use strict; -use Getopt::Long; - -my($initfini) = "initfini.s"; -my($crti) = "crti.S"; -my($crtn) = "crtn.S"; -my($alignval) = ""; -my($endp) = 0; -my($end) = 0; -my($omitcrti) = 0; -my($omitcrtn) = 0; -my($line); - -# Get commandline parameters -Getopt::Long::Configure("no_ignore_case", "bundling"); -&GetOptions( "initfini=s" => \$initfini, - "crti=s" => \$crti, - "crtn=s" => \$crtn, - ); - -chomp($initfini); -chomp($crti); -chomp($crtn); - - -if ($initfini) { - open(INITFINI,"<$initfini") or - die "(fatal) Can't open $initfini$!"; -} else { - die "(fatal) Please give me an --initfini argument$!"; -} -while() { - if (/\.endp/) { - $endp=1; - next; - } - if (/\.end/) { - $end=1; - next; - } - if (/\.align(.*)/) { - $alignval=$1; - next; - } - -} -close(INITFINI); - - - - - -if ($initfini) { - open(INITFINI,"<$initfini") or - die "(fatal) Can't open $initfini$!"; -} else { - die "(fatal) Please give me an --initfini argument$!"; -} - -if ($crti) { - open(CRTI,">$crti") or - die "(fatal) Can't open $crti$!"; -} else { - die "(fatal) Please give me a --asm argument$!"; -} -if ($crtn) { - open(CRTN,">$crtn") or - die "(fatal) Can't open $crtn$!"; -} else { - die "(fatal) Please give me a --asm argument$!"; -} - -while() { - if (/HEADER_ENDS/) { - $omitcrti = 1; - $omitcrtn = 1; - next; - } - if (/PROLOG_BEGINS/) { - $omitcrti = 0; - $omitcrtn = 0; - next; - } - if (/i_am_not_a_leaf/) { - next; - } - if (/^_init:/ || /^_fini:/) { - $omitcrtn = 1; - } - if (/PROLOG_PAUSES/) { - $omitcrti = 1; - next; - } - if (/PROLOG_UNPAUSES/) { - $omitcrti = 0; - next; - } - if (/PROLOG_ENDS/) { - $omitcrti = 1; - next; - } - if (/EPILOG_BEGINS/) { - $omitcrtn = 0; - next; - } - if (/EPILOG_ENDS/) { - $omitcrtn = 1; - next; - } - if (/TRAILER_BEGINS/) { - $omitcrti = 0; - $omitcrtn = 0; - next; - } - if (/END_INIT/) { - if ($endp) { - s/END_INIT/.endp _init/; - } else { - if($end) { - s/END_INIT/.end _init/; - } else { - s/END_INIT//; - } - } - } - if (/END_FINI/) { - if ($endp) { - s/END_FINI/.endp _fini/; - } else { - if($end) { - s/END_FINI/.end _fini/; - } else { - s/END_FINI//; - } - } - } - if (/ALIGN/) { - if($alignval) { - s/ALIGN/.align $alignval/; - } else { - s/ALIGN//; - } - } - if (!$omitcrti) { - print CRTI; - } - if (!$omitcrtn) { - print CRTN; - } -} -close(INITFINI); -close(CRTI); -close(CRTN); - -- cgit v1.2.3