Thanks, it does work on non native QEMU user mode with the -L option: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/b60c6f1b9c8bb7c34cf2c7fbce6f035d11483d4c#qemu-user-mode
On Mon, May 28, 2018 at 5:01 PM, Jason Lowe-Power <[email protected]> wrote: > Hi Ciro, > > As you seemed to have figured out, running dynamically linked executables > has only been tested for x86_64 native platforms. It *is supported* if your > binary is x86 and your native machine is x86. I'm not sure what it would > take to get this working for native ARM machines (e.g., simulating ARM and > running on an ARM native machine) or if you could use QEMU user mode to get > dynamically linked executables to work on a non-native machine. Both of > these cases would likely require some re-working of the code. > > Cheers, > Jason > > On Sat, May 26, 2018 at 11:56 AM Ciro Santilli <[email protected]> > wrote: >> >> >> https://stackoverflow.com/questions/50542222/how-to-run-a-dynamically-linked-executable-syscall-emulation-mode-se-py-in-gem5 >> >> After >> https://stackoverflow.com/questions/48959349/how-to-solve-fatal-kernel-too-old-when-running-gem5-in-syscall-emulation-se-m >> I managed to run a statically linked hello world under certain >> conditions. >> >> But if I try to run an ARM dynamically linked one against the stdlib with: >> >> ./out/common/gem5/build/ARM/gem5.opt >> ./gem5/gem5/configs/example/se.py -c ./a.out >> >> it fails with: >> >> fatal: Unable to open dynamic executable's interpreter. >> >> How to make it find the interpreter? Hopefully without copying my >> cross' toolchain's interpreter on my host's root. >> >> For x86_64 it works if I use my native compiler, and as expected >> `strace` says that it is using the native interpreter, but it does not >> work if I use a cross compiler. >> >> The current FAQ says it is not possible to use dynamic executables: >> http://gem5.org/Frequently_Asked_Questions but I don't trust it, and >> then these presentations mention it: >> >> * http://www.gem5.org/wiki/images/0/0c/2015_ws_08_dynamic-linker.pdf >> * http://research.cs.wisc.edu/multifacet/papers/learning_gem5_tutorial.pdf >> >> but not how to actually use it. >> >> QEMU user moe has the `-L` option for that. >> >> Tested in gem5 49f96e7b77925837aa5bc84d4c3453ab5f07408e >> _______________________________________________ >> gem5-users mailing list >> [email protected] >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > > > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users _______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
