about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/analysis/sandbox.py4
-rw-r--r--miasm2/expression/expression.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/miasm2/analysis/sandbox.py b/miasm2/analysis/sandbox.py
index 8676f373..f7009f3e 100644
--- a/miasm2/analysis/sandbox.py
+++ b/miasm2/analysis/sandbox.py
@@ -232,6 +232,8 @@ class OS_Linux(OS):
         self.elf = elf
         preload_elf(self.jitter.vm, elf, libs)
 
+        self.entry_point = elf.Ehdr.entry
+
         # Library calls handler
         self.jitter.add_lib_handler(libs, custom_methods)
 
@@ -348,7 +350,7 @@ class Sandbox_Linux_x86_32(Sandbox, Arch_x86_32, OS_Linux):
         """
         If addr is not set, use entrypoint
         """
-        if addr is None:
+        if addr is None and self.options.address is None:
             addr = self.entry_point
         super(Sandbox_Linux_x86_32, self).run(addr)
 
diff --git a/miasm2/expression/expression.py b/miasm2/expression/expression.py
index d59dca2c..af932512 100644
--- a/miasm2/expression/expression.py
+++ b/miasm2/expression/expression.py
@@ -866,7 +866,7 @@ class ExprCompose(Expr):
 
     def get_w(self):
         return reduce(lambda x, y:
-            x.union(y[0].get_r(mem_read, cst_read)), self.args, set())
+            x.union(y[0].get_w()), self.args, set())
 
     def __contains__(self, e):
         if self == e: