From: Erik van der Kouwe Date: Tue, 13 Mar 2012 10:22:19 +0000 (+0100) Subject: sprofalyze forgets a.out and learns that ELF binaries have larger addresses X-Git-Tag: v3.2.1~664 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=9e56468d6cd29e516cfc7ee24d29c5a6b79fdf25;p=minix.git sprofalyze forgets a.out and learns that ELF binaries have larger addresses --- diff --git a/commands/profile/sprofalyze.pl b/commands/profile/sprofalyze.pl index 1721c0dc0..711f0e5fa 100755 --- a/commands/profile/sprofalyze.pl +++ b/commands/profile/sprofalyze.pl @@ -12,8 +12,7 @@ # Configuration options: # Location and parameters of nm program to extract symbol tables -$acknm = "/usr/bin/acknm -dn"; -$gnm = "/usr/pkg/bin/nm --radix=d -n"; +$nm = "/usr/pkg/bin/nm --radix=d -n"; # Location of src (including trailing /) $src_root = qw( @@ -142,14 +141,9 @@ sub read_symbols next; } - if (`file $fullname | grep NSYM`) { - $nm = $gnm; - } else { - $nm = $acknm; - } # Create a hash entry for each symbol table (text) entry. foreach $_ (`$nm $fullname`) { - if (/^0{0,7}(\d{0,8})\s[tT]\s(\w{1,32})\n$/) { + if (/^0{0,7}(\d{0,10})\s[tT]\s(\w{1,32})\n$/) { ${$shortname."_hash"}{$1} = $2; } }