qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] TCG flow vs dyngen


From: Stefano Bonifazi
Subject: Re: [Qemu-devel] TCG flow vs dyngen
Date: Sun, 16 Jan 2011 20:02:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

Thank you very much for Your fast reply!


On 01/16/2011 07:29 PM, Peter Maydell wrote:
Linux doesn't seem to have dlmopen
http://www.unix.com/man-page/All/3c/dlmopen/

#define __USE_GNU
#include <dlfcn.h>

lib_handle1 = dlmopen(LM_ID_NEWLM,"./libqemu-ppc.so", RTLD_NOW);

I am developing that on a clean ubuntu 10.10
but google suggests that it puts the library in its own namespace
but not its own address space.
I need to make the different instances of qemu-user exchange data .. obviously keeping all of them in the same address space would be the easiest way (unless I have to change all qemu code ;) ) Running each qemu as its own
process and using interprocess communication for whatever
coordination you need between the various instances seems
more likely to be workable to me. This will also fix your "can't run
more than one binary in succession" problem, because you can
just have the first qemu run and exit as normal and launch a
second qemu to run the second binary.

-- PMM
Exactly, it was the easiest way also for me.. and I've already done it, works smoothly .. the only big problem is that it is not good for my teacher.. he says it should work the dynamic library way o.O Working with libraries even solved the problem of consecutive runs, though according to me it is not good a software when you must reboot it for making it run again fine.. sounds more Windows style :D Clearly it makes memory "dirty" and do not clean after the target process completes its execution.. leaving the OS care about it. I tried zeroing all global variables before starting a new execution without results (other than making it stall) .. After very long time spent trying to find a solution I think the problem should be with the mmap' ings stuff in the loader .. the same reason why 2 different libraries with their own namespaces clash according to me.. the elf loaders work globally within the unique address space .. I think for a guru of loaders-linkers should not be so difficult to patch it.. but not for a student who almost heard about them for the first time ;)
Any help is very appreciated :)
Thank you again!
Stefano B.









reply via email to

[Prev in Thread] Current Thread [Next in Thread]