From b91b4d00d0bdc9c29a43a3cf859f1444273495cd Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Mon, 20 May 2002 18:35:43 +0000 Subject: Changes needed for MIPS with regards to the .init and .fini sections. --- extra/scripts/initfini.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'extra') diff --git a/extra/scripts/initfini.pl b/extra/scripts/initfini.pl index ec6bdb36b..7c592daac 100755 --- a/extra/scripts/initfini.pl +++ b/extra/scripts/initfini.pl @@ -31,19 +31,20 @@ if ($initfini) { } else { die "(fatal) Please give me an --initfini argument$!"; } -while($line = ) { - if ($line =~ /^\w\.endp/) { +while() { + if (/\.endp/) { $endp=1; next; } - if ($line =~ /^\w\.end/) { + if (/\.end/) { $end=1; next; } - if ($line =~ /\w\.align\(.*\)/) { + if (/\.align(.*)/) { $alignval=$1; next; } + } close(INITFINI); @@ -79,8 +80,12 @@ while() { } if (/PROLOG_BEGINS/) { $omitcrti = 0; + $omitcrtn = 0; next; } + if (/^_init:/ || /^_fini:/) { + $omitcrtn = 1; + } if (/PROLOG_PAUSES/) { $omitcrti = 1; next; -- cgit v1.2.3