mirror of
				https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
				synced 2025-10-31 14:30:50 +00:00 
			
		
		
		
	 9c49fd307a
			
		
	
	
		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/);
 | |
| }
 |