diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-08-19 10:07:41 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-08-19 10:07:41 +0000 |
commit | d7643439eba4ded2253cc4c0c5b2531ee82bd4ea (patch) | |
tree | 87538475452f3b3ee086fd704ef70e97e6a35585 /extra/scripts/initfini.pl | |
parent | 3358b761b15daa480ca0ca788b3fe077ac967674 (diff) |
Work from Stefan Allius which allows superH to use the common
method for building crti.o and crtn.o
Diffstat (limited to 'extra/scripts/initfini.pl')
-rwxr-xr-x | extra/scripts/initfini.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/extra/scripts/initfini.pl b/extra/scripts/initfini.pl index 7c592daac..431b39396 100755 --- a/extra/scripts/initfini.pl +++ b/extra/scripts/initfini.pl @@ -11,6 +11,7 @@ my($endp) = 0; my($end) = 0; my($omitcrti) = 0; my($omitcrtn) = 0; +my($discard) = 0; my($line); # Get commandline parameters @@ -83,6 +84,10 @@ while(<INITFINI>) { $omitcrtn = 0; next; } + if (/^i_am_not_a_leaf/) { + $discard = 1; + next; + } if (/^_init:/ || /^_fini:/) { $omitcrtn = 1; } @@ -140,12 +145,13 @@ while(<INITFINI>) { s/ALIGN//; } } - if (!$omitcrti) { + if (!$omitcrti && !$discard) { print CRTI; } - if (!$omitcrtn) { + if (!$omitcrtn && !$discard) { print CRTN; } + $discard = 0; } close(INITFINI); close(CRTI); |