Skip to content

Commit

Permalink
Drop ujump hacks (radareorg#9224)
Browse files Browse the repository at this point in the history
* Drop ujump hack

* Remove anal.pltujmp config var
  • Loading branch information
sivaramaaa authored Jan 20, 2018
1 parent 3e54b96 commit cffb7eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
5 changes: 3 additions & 2 deletions libr/anal/fcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,8 +1207,8 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut6
}
walk_switch (anal, fcn, op.addr, op.addr + op.size);
}

if (anal->opt.pltujmp && anal->cur) {
#if 0
if (anal->cur) {
/* if UJMP is in .plt section just skip it */
RBinSection *s = anal->binb.get_vsect_at (anal->binb.bin, addr);
if (s && s->name[0]) {
Expand All @@ -1230,6 +1230,7 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut6
}
}
}
#endif
FITFCNSZ ();
r_anal_op_fini (&op);
return R_ANAL_RET_END;
Expand Down
8 changes: 0 additions & 8 deletions libr/core/cconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,6 @@ static int cb_analeobjmp(void *user, void *data) {
return true;
}

static int cb_analpltujmp(void *user, void *data) {
RCore *core = (RCore*) user;
RConfigNode *node = (RConfigNode*) data;
core->anal->opt.pltujmp = node->i_value;
return true;
}

static int cb_analafterjmp(void *user, void *data) {
RCore *core = (RCore*) user;
RConfigNode *node = (RConfigNode*) data;
Expand Down Expand Up @@ -2212,7 +2205,6 @@ R_API int r_core_config_init(RCore *core) {

SETCB ("anal.armthumb", "false", &cb_analarmthumb, "aae computes arm/thumb changes (lot of false positives ahead)");
SETCB ("anal.eobjmp", "false", &cb_analeobjmp, "jmp is end of block mode (option)");
SETCB ("anal.pltujmp", "true", &cb_analpltujmp, "if UJMP is in .plt section just skip it");
SETCB ("anal.afterjmp", "true", &cb_analafterjmp, "Continue analysis after jmp/ujmp");
SETI ("anal.depth", 16, "Max depth at code analysis"); // XXX: warn if depth is > 50 .. can be problematic
SETICB ("anal.sleep", 0, &cb_analsleep, "Sleep N usecs every so often during analysis. Avoid 100% CPU usage");
Expand Down
1 change: 0 additions & 1 deletion libr/include/r_anal.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,6 @@ typedef struct r_anal_options_t {
int nopskip; // skip nops at the beginning of functions
int hpskip; // skip `mov reg,reg` and `lea reg,[reg]`
int jmptbl; // analyze jump tables
int pltujmp; // if UJMP is in .plt section just skip it
bool pushret; // analyze push+ret as jmp
bool armthumb; //
} RAnalOptions;
Expand Down

0 comments on commit cffb7eb

Please sign in to comment.