} 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);
}
if (/PROLOG_BEGINS/) {
$omitcrti = 0;
+ $omitcrtn = 0;
next;
}
+ if (/^_init:/ || /^_fini:/) {
+ $omitcrtn = 1;
+ }
if (/PROLOG_PAUSES/) {
$omitcrti = 1;
next;
/* Now the epilog. */
asm ("\n/*@_init_PROLOG_ENDS*/");
asm ("\n/*@_init_EPILOG_BEGINS*/");
- SECTION(".init");
}
-asm ("END_INIT");
/* End of the _init epilog, beginning of the _fini prolog. */
asm ("\n/*@_init_EPILOG_ENDS*/");
/* Beginning of the _fini epilog. */
asm ("\n/*@_fini_EPILOG_BEGINS*/");
- SECTION (".fini");
}
-asm ("END_FINI");
/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
is shared between both crt files. */