summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rwxr-xr-xextra/scripts/initfini.pl13
1 files changed, 9 insertions, 4 deletions
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 = <INITFINI>) {
- if ($line =~ /^\w\.endp/) {
+while(<INITFINI>) {
+ 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(<INITFINI>) {
}
if (/PROLOG_BEGINS/) {
$omitcrti = 0;
+ $omitcrtn = 0;
next;
}
+ if (/^_init:/ || /^_fini:/) {
+ $omitcrtn = 1;
+ }
if (/PROLOG_PAUSES/) {
$omitcrti = 1;
next;