Tarmo Pikaro writes: >> It would be much easier to ship an executable containing both the guest >> application and qemu, so that executing it starts qemu with a >> pre-defined configuration and runs the guest binary. > > - Binary recompilation would allow faster execution than emulated code
QEMU does precisely that, using a JIT. You wouldn't obtain much more performance by generating a pre-translated binary instead of using QEMU's JIT. And that's without taking into account the difficulties associated with the static binary analysis that would be required (as others have already pointed to you to in previous mails). > - qemu constantly changes (based on amount of patches provided in this > mail list) - in order to keep image+qemu working - simplest way is to convert > into > executable. Btw - qemu could be used as a bootstrap to image as well. > :-) Maybe you didn't understand what I was saying. Think of it as a self-extracting executable that contains both a specific qemu binary, as well as the guest binary you want to execute. When you execute that bundle, it transparently extracts both components (qemu + the guest application) and starts qemu to execute that application. Still, this is a poor approach from the software maintenance point of view, and falls into the kind of strategies that windows application developers use (bundle private copies of each library the application is going to use). > - And finally modular "emulation" - it would be possible to recompile > individual > .dll to another os. I suppose you meant another architecture, as recompiling to another OS makes no sense on the general case (can have a completely different set of syscalls). Still, I don't see the point of translating a single library instead of the whole application (specially when you have access to a library compiled for you target architecture, or even better access to the source code to compile that library to whatever target you desire). > Side effects would be: > > - More difficult to debug - since mapping to original binary image should be > somehow > maintained - if register dump helps anyhow the developer. As others have told you, qemu already has an interface to allow gdb to debug the guest application. Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth