Remove ifdef JAYRO (#538)
This commit is contained in:
parent
6610de7568
commit
f5664319be
2 changed files with 0 additions and 50 deletions
|
|
@ -14,9 +14,6 @@
|
|||
#define BB_ALIGN 0x10
|
||||
#define MAX_SCAN_SIZE 0x7ffffff
|
||||
|
||||
/* speedup analysis by removing some function overlapping checks */
|
||||
#define JAYRO_04 1
|
||||
|
||||
// 16 KB is the maximum size for a basic block
|
||||
#define MAX_FLG_NAME_SIZE 64
|
||||
|
||||
|
|
@ -1509,10 +1506,8 @@ RZ_API int rz_analysis_fcn(RzAnalysis *analysis, RzAnalysisFunction *fcn, ut64 a
|
|||
break;
|
||||
}
|
||||
}
|
||||
#if JAYRO_04
|
||||
// fcn is not yet in analysis => pass NULL
|
||||
rz_analysis_function_resize(fcn, endaddr - fcn->addr);
|
||||
#endif
|
||||
rz_analysis_trim_jmprefs(analysis, fcn);
|
||||
}
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -778,42 +778,6 @@ static bool listOpDescriptions(void *_core, const char *k, const char *v) {
|
|||
return true;
|
||||
}
|
||||
|
||||
/* better aac for windows-x86-32 */
|
||||
#define JAYRO_03 0
|
||||
|
||||
#if JAYRO_03
|
||||
|
||||
static bool analysis_is_bad_call(RzCore *core, ut64 from, ut64 to, ut64 addr, ut8 *buf, int bufi) {
|
||||
ut64 align = RZ_ABS(addr % PE_ALIGN);
|
||||
ut32 call_bytes;
|
||||
|
||||
// XXX this is x86 specific
|
||||
if (align == 0) {
|
||||
call_bytes = (ut32)((ut8 *)buf)[bufi + 3] << 24;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi + 2] << 16;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi + 1] << 8;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi];
|
||||
} else {
|
||||
call_bytes = (ut32)((ut8 *)buf)[bufi - align + 3] << 24;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi - align + 2] << 16;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi - align + 1] << 8;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi - align];
|
||||
}
|
||||
if (call_bytes >= from && call_bytes <= to) {
|
||||
return true;
|
||||
}
|
||||
call_bytes = (ut32)((ut8 *)buf)[bufi + 4] << 24;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi + 3] << 16;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi + 2] << 8;
|
||||
call_bytes |= (ut32)((ut8 *)buf)[bufi + 1];
|
||||
call_bytes += addr + 5;
|
||||
if (call_bytes >= from && call_bytes <= to) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool cmd_analysis_aaft(RzCore *core) {
|
||||
RzListIter *it;
|
||||
RzAnalysisFunction *fcn;
|
||||
|
|
@ -6619,14 +6583,6 @@ static void _analysis_calls(RzCore *core, ut64 addr, ut64 addr_end, bool printCo
|
|||
isValidCall = memcmp(buf, "\x00\x00\x00\x00", 4);
|
||||
}
|
||||
if (isValidCall) {
|
||||
#if JAYRO_03
|
||||
if (!analysis_is_bad_call(core, from, to, addr, buf, bufi)) {
|
||||
fcn = rz_analysis_get_fcn_in(core->analysis, op.jump, RZ_ANALYSIS_FCN_TYPE_ROOT);
|
||||
if (!fcn) {
|
||||
rz_core_analysis_fcn(core, op.jump, addr, RZ_ANALYSIS_REF_TYPE_CALL, depth);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (printCommands) {
|
||||
rz_cons_printf("ax 0x%08" PFMT64x " 0x%08" PFMT64x "\n", op.jump, addr);
|
||||
rz_cons_printf("af @ 0x%08" PFMT64x "\n", op.jump);
|
||||
|
|
@ -6637,7 +6593,6 @@ static void _analysis_calls(RzCore *core, ut64 addr, ut64 addr_end, bool printCo
|
|||
rz_core_analysis_fcn(core, op.jump, addr, RZ_ANALYSIS_REF_TYPE_CALL, depth);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue