https://jxself.org/git/linux-libre.git
Raw File
Tip revision: cb4a25c19d1437bb9afad0ec766855eed86cd57f authored by Jason Self on 17 February 2009, 17:29:45 UTC
Linux-libre 2.6.28.6-gnu1
Tip revision: cb4a25c
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