about summary refs log tree commit diff stats
path: root/miasm2/core/cpu.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2015-03-27 16:12:19 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2015-04-01 23:47:37 +0200
commit89680eb28d75e8313ab59dbd8c31930596138bad (patch)
tree9cbdca606fcb582baf452224931fd46220133ca1 /miasm2/core/cpu.py
parentd91f03ed42035c05e485aa082af5b1c03865edb7 (diff)
downloadmiasm-89680eb28d75e8313ab59dbd8c31930596138bad.tar.gz
miasm-89680eb28d75e8313ab59dbd8c31930596138bad.zip
Asmbloc: updt api
Diffstat (limited to 'miasm2/core/cpu.py')
-rw-r--r--miasm2/core/cpu.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py
index bde95200..faba895a 100644
--- a/miasm2/core/cpu.py
+++ b/miasm2/core/cpu.py
@@ -947,14 +947,14 @@ class instruction(object):
             for x in ids:
                 if isinstance(x.name, asmbloc.asm_label):
                     name = x.name.name
+                    # special symbol $
+                    if name == '$':
+                        fixed_ids[x] = self.get_asm_offset(x)
+                        continue
                     if not name in symbols:
                         raise ValueError('unresolved symbol! %r' % x)
                 else:
                     name = x.name
-                # special symbol
-                if name == '$':
-                    fixed_ids[x] = self.get_asm_offset(x)
-                    continue
                 if not name in symbols:
                     continue
                 if symbols[name].offset is None:
@@ -981,6 +981,8 @@ class cls_mn(object):
     __metaclass__ = metamn
     args_symb = []
     instruction = instruction
+    # Block's offset alignement
+    alignment = 1
 
     @classmethod
     def guess_mnemo(cls, bs, attrib, pre_dis_info, offset):