/usr/lib/radare/bin/elf-prg-maps 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 | #!/bin/sh
PRG=$1
if [ -z "${PRG}" ]; then
echo "Usage: rsc elf-prg-maps \${FILE}"
echo "=> Nice for core files!"
else
readelf -l ${PRG} | grep 0x | sed -e 's,LOAD,prg_,g' -e 's,NOTE,note_,g' |grep -e prg -e note | awk '{print "f "$1""$3" @ "$2"\nf "$1""$3"_end @ "$2"+"$5}'
fi
|