diff options
| author | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
|---|---|---|
| committer | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
| commit | d2e1446d81725c351dc73a03b397ce043fb18452 (patch) | |
| tree | 4dbc616b7f92aea39cd697a9084205ddb805e344 /scripts/profile2linkerlist.pl | |
first commit
Diffstat (limited to 'scripts/profile2linkerlist.pl')
| -rw-r--r-- | scripts/profile2linkerlist.pl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/profile2linkerlist.pl b/scripts/profile2linkerlist.pl new file mode 100644 index 000000000..6943fa7cc --- /dev/null +++ b/scripts/profile2linkerlist.pl @@ -0,0 +1,19 @@ +#!/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 +# +use strict; + +while (<>) { + my $line = $_; + + $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/; + + print "*(.text.$1)\n" + unless ($line =~ /unknown/) || ($line =~ /total/); +} |
