mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
9c49fd307a
Turn on strict checking. Simplify code by using "unless" statement. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: WANG Cong <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
20 lines
375 B
Perl
20 lines
375 B
Perl
#!/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/);
|
|
}
|