From ee6614137d844cc8f534f2bb1d5ad0d0c8b0404e Mon Sep 17 00:00:00 2001 From: Tim Becker Date: Thu, 5 Mar 2015 16:05:15 -0500 Subject: [PATCH] Hacky fix for #76 --- static2/model.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static2/model.py b/static2/model.py index fddd9dbb..e8c807b0 100644 --- a/static2/model.py +++ b/static2/model.py @@ -83,6 +83,13 @@ class BapInsn(object): self._dests = dests def __str__(self): + # fix relative jumps to absolute address + for d in self._dests: + if d[1] is not DESTTYPE.implicit: + mnemonic = self.insn.asm.split("\t")[:-1] #ignore last operand + mnemonic.append(hex(d[0]).strip("L")) #add destination to end + newasm = "\t".join(mnemonic) + return newasm return self.insn.asm def is_jump(self):