Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 authored by Linus Torvalds on 10 May 2010, 01:36:28 UTC
Linux 2.6.34-rc7
Tip revision: b57f95a
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