https://jxself.org/git/linux-libre.git
Raw File
Tip revision: 815535ecbcc85c7e7b7684e253d8cbd3871fd7f6 authored by Jason Self on 08 December 2009, 23:05:44 UTC
Linux-libre 2.6.27.41-gnu1
Tip revision: 815535e
profile2linkerlist.pl
#!/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";
  }
}
back to top