diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-03-27 14:50:11 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-04-01 23:47:37 +0200 |
| commit | b148652ebd8e8b02aa9514cc3d21098c7002d694 (patch) | |
| tree | 7dfa95414e79b5d84c2c89d25d96ea6dfdca1182 /miasm2/arch/arm/arch.py | |
| parent | f9c49e92dada2aa51ca594f435f962617796c116 (diff) | |
| download | miasm-b148652ebd8e8b02aa9514cc3d21098c7002d694.tar.gz miasm-b148652ebd8e8b02aa9514cc3d21098c7002d694.zip | |
Parse_asm: generate asm_label on symbol parsing
For an unknown symbol, instead of generating ExprId('toto'), it will generate
ExprId(asm_label('toto')). As label is generated in the architecture, this label
must be catched in the parse_asm module to be inserted in the current
symbol_pool.
Diffstat (limited to 'miasm2/arch/arm/arch.py')
| -rw-r--r-- | miasm2/arch/arm/arch.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/miasm2/arch/arm/arch.py b/miasm2/arch/arm/arch.py index 740fd1df..87af007a 100644 --- a/miasm2/arch/arm/arch.py +++ b/miasm2/arch/arm/arch.py @@ -9,6 +9,7 @@ from collections import defaultdict from miasm2.core.bin_stream import bin_stream import miasm2.arch.arm.regs as regs_module from miasm2.arch.arm.regs import * +from miasm2.core.asmbloc import asm_label # A1 encoding @@ -167,7 +168,7 @@ int_or_expr = base_expr def ast_id2expr(t): if not t in mn_arm.regs.all_regs_ids_byname: - r = ExprId(t) + r = ExprId(asm_label(t)) else: r = mn_arm.regs.all_regs_ids_byname[t] return r |