/usr/lib/radare/bin/syms-extract is in radare-common 1:1.5.2-6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/perl
# author: pancake <youterm.com>
# date: 2008-05-11
#if [ -z "$1" ]; then
# echo "Usage: rsc syms-extract\n"
# exit 1
#fi
my @a=split(/\n/,`nm -DS $ARGV[0] | grep " 00"`);
for $i (@a) {
$i=~/^(.*) (.*) . (.*)$/;
$addr="0x".$1;
$length="0x".$2;
$name="sym_".$3;
print "f $name @ $addr\n";
print "pa $length @ $addr\n";
}
|