diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
commit | e02a4cabfcb9a999b74a2e2e6f13ffcb7ff2d606 (patch) | |
tree | 2f3db60be4c57eca2a4c3ab3f3122dcf1ec0c624 /scripts/profile2linkerlist.pl | |
parent | 600511e86babe3727264a0883a3a264f6fb6caf5 (diff) | |
parent | f3cab8a0b1a772dc8b055b7affa567a366627c9e (diff) |
Merge branch 'master'
Diffstat (limited to 'scripts/profile2linkerlist.pl')
-rw-r--r-- | scripts/profile2linkerlist.pl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/profile2linkerlist.pl b/scripts/profile2linkerlist.pl new file mode 100644 index 00000000000..cb4260ebdb9 --- /dev/null +++ b/scripts/profile2linkerlist.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +# +# Takes a (sorted) output of readprofile and turns it into a list suitable for +# linker scripts +# +# usage: +# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist +# + +while (<>) { + my $line = $_; + + $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/; + + if ( ($line =~ /unknown/) || ($line =~ /total/)) { + + } else { + print "*(.text.$1)\n"; + } +} |