This repository has been archived on 2025-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
g900kernel/scripts/profile2linkerlist.pl
Sergey Kishchenko 5e27c24b6f Initial commit
2009-11-03 01:12:52 +02:00

22 lines
378 B
Perl
Executable File

#!/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";
}
}