mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 02:21:36 +00:00
06ed5c2bfa
The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. Signed-off-by: Michal Marek <mmarek@suse.cz>
20 lines
375 B
Perl
Executable File
20 lines
375 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
|
|
#
|
|
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/);
|
|
}
|