radare2/libr/rpathstrip.sh
pancake 6e6dbf5b81 * Some fixes in code analysis
- Fix some issues for 64bit instructions in z0mbie dislen
* Fix EOF, ^D and terminal resize
  - Do not understand terminal resize as EOF
* Display rpathstrip lines to identify segfaults
* Implement 'ao' command to analyze opcodes
2010-03-26 17:01:25 +01:00

40 lines
861 B
Bash
Executable File

#!/bin/sh
# UGLY HACK to remove all rpaths and make r2 work without
# installation.. rpath should be removed at some point..
BIN=bin/t/rpathdel
BINS="rasm2 radare2 rabin2 radiff2 rahash2 rax2 rafind2 rasign2"
if [ -z "$1" ]; then
echo "Usage: ./rpathstrip.sh /usr"
exit 0
fi
if [ ! -x "${BIN}" ]; then
echo "Not stripping rpaths"
exit 0
fi
echo "Stripping rpath from installed binaries..."
LD_LIBRARY_PATH=$1/lib
export LD_LIBRARY_PATH
for a in ${BINS}; do
${BIN} $1/bin/$a $1/bin/$a
done
for a in ${LIBS}; do
${BIN} $1/lib/$a $1/lib/$a
done
for a in `cd $1/lib/radare2 ; ls`; do
echo ${BIN} $1/lib/radare2/$a $1/lib/radare2/$a
${BIN} $1/lib/radare2/$a $1/lib/radare2/$a
done
for a in `cd $1/lib/radare2/test ; ls`; do
echo ${BIN} $1/lib/radare2/test/$a $1/lib/radare2/test/$a
${BIN} $1/lib/radare2/test/$a $1/lib/radare2/test/$a
done
exit 0