From 4c2224a784c15784597624fadd6d9a5dae7d37a2 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Fri, 24 Aug 2018 15:39:47 +0200 Subject: Core: fix asm int --- miasm2/core/cpu.py | 4 ++++ miasm2/core/parse_asm.py | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'miasm2/core') diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index 686e12ba..8491c5c8 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -1030,6 +1030,10 @@ class instruction(object): if '_' in names: fixed_expr[exprloc] = self.get_asm_next_offset(exprloc) continue + arg_int = symbols.get_location_offset(loc_key) + if arg_int is not None: + fixed_expr[exprloc] = m2_expr.ExprInt(arg_int, exprloc.size) + continue if not names: raise ValueError('Unresolved symbol: %r' % exprloc) diff --git a/miasm2/core/parse_asm.py b/miasm2/core/parse_asm.py index 7efa17d0..aeb5d219 100644 --- a/miasm2/core/parse_asm.py +++ b/miasm2/core/parse_asm.py @@ -199,9 +199,6 @@ def parse_txt(mnemo, attrib, txt, loc_db=None): line = line[:line.find(';')] line = line.strip(' ').strip('\t') instr = mnemo.fromstring(line, loc_db, attrib) - - if instr.dstflow(): - instr.dstflow2label(loc_db) lines.append(instr) asmblock.log_asmblock.info("___pre asm oki___") -- cgit 1.4.1