about summary refs log tree commit diff stats
path: root/example/ida
diff options
context:
space:
mode:
Diffstat (limited to 'example/ida')
-rw-r--r--example/ida/graph_ir.py4
-rw-r--r--example/ida/utils.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/example/ida/graph_ir.py b/example/ida/graph_ir.py
index 7e303aac..6dfa1f7d 100644
--- a/example/ida/graph_ir.py
+++ b/example/ida/graph_ir.py
@@ -121,6 +121,10 @@ def build_graph(verbose=False, simplify=False):
         # print hex(ad), repr(name)
         if name is None:
             continue
+        if (mdis.symbol_pool.getby_offset(addr) or
+            mdis.symbol_pool.getby_name(name)):
+            # Symbol alias
+            continue
         mdis.symbol_pool.add_label(name, addr)
 
     if verbose:
diff --git a/example/ida/utils.py b/example/ida/utils.py
index 585d86a9..e026f2fc 100644
--- a/example/ida/utils.py
+++ b/example/ida/utils.py
@@ -40,7 +40,7 @@ def guess_machine():
                         (False, 64, False): "aarch64l",
                         }
         is_armt = globals().get('armt', False)
-        is_bigendian = globals().get('bigendian', False)
+        is_bigendian = info.is_be()
         infos = (is_armt, size, is_bigendian)
         if not infos in info2machine:
             raise NotImplementedError('not fully functional')