]> Zhao Yanbai Git Server - minix.git/commitdiff
sprofalyze forgets a.out and learns that ELF binaries have larger addresses
authorErik van der Kouwe <erik@minix3.org>
Tue, 13 Mar 2012 10:22:19 +0000 (11:22 +0100)
committerErik van der Kouwe <erik@minix3.org>
Tue, 13 Mar 2012 10:23:35 +0000 (11:23 +0100)
commands/profile/sprofalyze.pl

index 1721c0dc0727dc907e8c243f010600c0217c98d7..711f0e5fa3519e66bb504d9739a22aa246f35830 100755 (executable)
@@ -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;
                }
        }