sprofalyze forgets a.out and learns that ELF binaries have larger addresses
This commit is contained in:
parent
e8d2d2f6b6
commit
9e56468d6c
1 changed files with 2 additions and 8 deletions
|
@ -12,8 +12,7 @@
|
||||||
# Configuration options:
|
# Configuration options:
|
||||||
|
|
||||||
# Location and parameters of nm program to extract symbol tables
|
# Location and parameters of nm program to extract symbol tables
|
||||||
$acknm = "/usr/bin/acknm -dn";
|
$nm = "/usr/pkg/bin/nm --radix=d -n";
|
||||||
$gnm = "/usr/pkg/bin/nm --radix=d -n";
|
|
||||||
|
|
||||||
# Location of src (including trailing /)
|
# Location of src (including trailing /)
|
||||||
$src_root = qw(
|
$src_root = qw(
|
||||||
|
@ -142,14 +141,9 @@ sub read_symbols
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (`file $fullname | grep NSYM`) {
|
|
||||||
$nm = $gnm;
|
|
||||||
} else {
|
|
||||||
$nm = $acknm;
|
|
||||||
}
|
|
||||||
# Create a hash entry for each symbol table (text) entry.
|
# Create a hash entry for each symbol table (text) entry.
|
||||||
foreach $_ (`$nm $fullname`) {
|
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;
|
${$shortname."_hash"}{$1} = $2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue