Fix bx pc ARM thumb analysis. Honor INSTALL_TARGET in sys/install.sh

This commit is contained in:
pancake 2015-04-30 23:18:56 +02:00
parent d9b1b341a7
commit f141aed5d1
2 changed files with 14 additions and 3 deletions

View File

@ -424,8 +424,17 @@ static void anop32 (RAnalOp *op, cs_insn *insn) {
op->type = R_ANAL_OP_TYPE_RET;
} else if (insn->detail->arm.cc) {
op->type = R_ANAL_OP_TYPE_CJMP;
op->jump = (ut64) (ut32)IMM(0);
if (REGID(1)==ARM_REG_PC) {
op->jump = addr+op->size;
} else {
op->jump = (ut64) (ut32)IMM(0);
op->jump = addr+op->size;
}
op->fail = addr+op->size;
if (op->jump == op->fail) {
op->type = R_ANAL_OP_TYPE_JMP;
op->fail = UT64_MAX;
}
} else {
op->type = R_ANAL_OP_TYPE_JMP;
op->jump = IMM(0);

View File

@ -4,6 +4,8 @@ MAKE=make
gmake --help >/dev/null 2>&1
[ $? = 0 ] && MAKE=gmake
[ -z "${INSTALL_TARGET}" ] && INSTALL_TARGET=symstall
# find root
cd `dirname $PWD/$0` ; cd ..
@ -24,7 +26,7 @@ fi
[ -n "${NOSUDO}" ] && SUDO=
if [ "${HARDEN}" = 1 ]; then
./sys/build-harden.sh $* && ${SUDO} ${MAKE} symstall
./sys/build-harden.sh $* && ${SUDO} ${MAKE} ${INSTALL_TARGET}
else
./sys/build.sh $* && ${SUDO} ${MAKE} symstall
./sys/build.sh $* && ${SUDO} ${MAKE} ${INSTALL_TARGET}
fi