/usr/lib/radare/bin/syms-disk 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 19 20 21 22 23 24 | #!/usr/bin/env perl
#
# Dump a radare script that flags all symbols at it's _FILE_ offset.
#
# author: pancake
#
my $target = $ARGV[0];
if (( $target eq "" ) || ( $target eq "-h" )) {
print STDERR "Usage: rsc syms-flag [file] > file.syms.flags\n";
exit 1;
}
my $base = qx(rsc elf-base-addr $target | head -n 1); chomp($base);
my @syms = split(/\n/, `rsc syms $target`);
for my $i (0 .. @syms) {
my ($addr, $name) = split(/ /,$syms[$i]);
next if ($name eq "");
$name=~s/\@.*//;
$name=~s/-/_/;
eval "\$addr=$addr-$base;";
printf("$name: 0x%x\n", $addr);
}
|