title: How to run a dynamically linked executable syscall emulation mode se.py in gem5?
body: <p>After <a href="https://stackoverflow.com/questions/48959349/how-to-solve-fatal-kernel-too-old-when-running-gem5-in-syscall-emulation-se-m">How to solve &quot;FATAL: kernel too old&quot; when running gem5 in syscall emulation SE mode?</a> I managed to run a statically linked hello world under certain conditions.</p>
  
  <p>But if I try to run an ARM dynamically linked one against the stdlib with:</p>
  
  <pre><code>./out/common/gem5/build/ARM/gem5.opt ./gem5/gem5/configs/example/se.py -c ./a.out
  </code></pre>
  
  <p>it fails with:</p>
  
  <pre><code>fatal: Unable to open dynamic executable's interpreter.
  </code></pre>
  
  <p>How to make it find the interpreter? Hopefully without copying my cross' toolchain's interpreter on my host's root.</p>
  
  <p>For x86_64 it works if I use my native compiler, and as expected <code>strace</code> says that it is using the native interpreter, but it does not work if I use a cross compiler.</p>
  
  <p>The current FAQ says it is not possible to use dynamic executables: <a href="http://gem5.org/Frequently_Asked_Questions" rel="nofollow noreferrer">http://gem5.org/Frequently_Asked_Questions</a> but I don't trust it, and then these presentations mention it:</p>
  
  <ul>
  <li><a href="http://www.gem5.org/wiki/images/0/0c/2015_ws_08_dynamic-linker.pdf" rel="nofollow noreferrer">http://www.gem5.org/wiki/images/0/0c/2015_ws_08_dynamic-linker.pdf</a></li>
  <li><a href="http://research.cs.wisc.edu/multifacet/papers/learning_gem5_tutorial.pdf" rel="nofollow noreferrer">http://research.cs.wisc.edu/multifacet/papers/learning_gem5_tutorial.pdf</a></li>
  </ul>
  
  <p>but not how to actually use it.</p>
  
  <p>QEMU user mode has the <code>-L</code> option for that.</p>
  
  <p>Tested in gem5 49f96e7b77925837aa5bc84d4c3453ab5f07408e</p>
  
  <p><a href="https://www.mail-archive.com/gem5-users@gem5.org/msg15582.html" rel="nofollow noreferrer">https://www.mail-archive.com/gem5-users@gem5.org/msg15582.html</a></p>