/usr/lib/radare/bin/objdiff 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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #!/bin/sh
#
# objdiff: objdump-based diff utility
#
# author: pancake <pancake@youterm.com>
#
# TODO
# Diff for binary sections of a file
# perl rewrite?
# diffize by symbols, not globally
# colorization (ATM use Git-color)
# getoptize
#
A=$1
B=$2
[ "$A" = "-h" ] && B=""
if [ -z "$B" ]; then
echo "Usage: rsc objdiff [bin1] [bin2]"
exit 1
fi
do_disasmdiff() {
A=$1
B=$2
TA=`printf $A | sed -e s,/,.,g`
TA="/tmp/$TA.objdump";
TB=`printf $B | sed -e s,/,.,g`
TB="/tmp/$TB.objdump"
objdump -d $A > $TA
objdump -d $B > $TB
diff -u $TA $TB
rm -f $TA $TB
}
do_disasmdiff $A $B
exit 0
|