Fix #16413 - Analyze code refs spotted with aae ##anal (#16423)

- Find 600 functions in a MIPS binary, without this only 4 functions are found
This commit is contained in:
pancake 2020-04-05 16:36:43 -04:00 committed by GitHub
parent 6b31b40a71
commit 38b8d5929d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -5154,6 +5154,8 @@ repeat:
? R_ANAL_REF_TYPE_CALL
: R_ANAL_REF_TYPE_CODE;
r_anal_xrefs_set (core->anal, cur, dst, ref);
r_core_anal_fcn (core, dst, UT64_MAX, R_ANAL_REF_TYPE_NULL, 1);
// analyze function here
#if 0
if (op.type == R_ANAL_OP_TYPE_UCALL || op.type == R_ANAL_OP_TYPE_RCALL) {
eprintf ("0x%08"PFMT64x" RCALL TO %llx\n", cur, dst);

View File

@ -10,6 +10,17 @@ EXPECT=<<EOF
EOF
RUN
NAME=mozi aae functions
FILE=../bins/elf/mips-mozi
CMDS=<<EOF
aae
aflc
EOF
EXPECT=<<EOF
428
EOF
RUN
NAME=mips hello ref anal
FILE=../bins/elf/analysis/mips.elf
ARGS=-e bin.strings=false -e anal.strings=true

View File

@ -32,6 +32,7 @@ push {r7, lr}
add ip, pc, 0, 12
push {r3, lr}
add ip, pc, 0, 12
str lr, [sp, -4]!
EOF
RUN