qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Bonifazi <stefboombastic@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Raphaël Lefèvre" <taylor.lefevre@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] TCG flow vs dyngen
Date: Sun, 16 Jan 2011 21:50:57 +0100	[thread overview]
Message-ID: <4D335A31.2090105@gmail.com> (raw)
In-Reply-To: <4D3340AB.60001@gmail.com>

Hi!
  In case you are interested in helping me, I'll give you a big piece of 
news I've just got (even my teacher is not informed yet! :) )
I've just managed to make more than one instance of qemu-user run at the 
same time linking the target code with a specified address for the code 
section (-Ttext address of ld).
It works fine and this proves my idea that the problem is within the elf 
loader..
Making it relocate the target code properly would fix the problem ;)
Now let's work on it :)
Regards,
Stefano B.

On 01/16/2011 08:02 PM, Stefano Bonifazi wrote:
> 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.
>
>
>

  parent reply	other threads:[~2011-01-16 20:52 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-16 14:46 [Qemu-devel] TCG flow vs dyngen Raphael Lefevre
2011-01-16 15:21 ` Stefano Bonifazi
2011-01-16 16:01   ` Raphaël Lefèvre
2011-01-16 16:43     ` Stefano Bonifazi
2011-01-16 18:29       ` Peter Maydell
2011-01-16 19:02         ` Stefano Bonifazi
2011-01-16 19:24           ` Peter Maydell
2011-01-24 13:20             ` [Qemu-devel] " Stefano Bonifazi
2011-01-16 20:50           ` Stefano Bonifazi [this message]
2011-01-16 21:08             ` [Qemu-devel] " Raphaël Lefèvre
2011-01-24 12:35               ` [Qemu-devel] " Stefano Bonifazi
2011-01-17 11:59             ` [Qemu-devel] " Lluís
2011-01-24 12:31               ` [Qemu-devel] " Stefano Bonifazi
2011-01-24 13:36                 ` Lluís
2011-01-24 14:00                   ` Stefano Bonifazi
2011-01-24 15:06                     ` Lluís
2011-01-24 17:23                       ` Stefano Bonifazi
2011-01-24 18:12                         ` Lluís
2011-01-16 19:16       ` [Qemu-devel] " Raphaël Lefèvre
2011-01-23 21:50     ` Rob Landley
2011-01-23 22:25       ` Stefano Bonifazi
2011-01-23 23:40         ` Rob Landley
2011-01-24 10:17           ` Stefano Bonifazi
2011-01-24 18:20             ` Rob Landley
2011-01-24 21:16               ` Stefano Bonifazi
2011-01-25  1:19                 ` Rob Landley
2011-01-25  8:53                   ` Stefano Bonifazi
2011-01-24 14:32       ` Peter Maydell
2011-01-24 14:56         ` Stefano Bonifazi
2011-01-24 15:15           ` Lluís
2011-01-24 18:02           ` Dushyant Bansal
2011-01-24 19:38             ` Stefano Bonifazi
2011-01-25  7:56               ` Dushyant Bansal
2011-01-25  9:04                 ` Stefano Bonifazi
2011-01-25  9:05                   ` Edgar E. Iglesias
2011-01-25  9:28                     ` Stefano Bonifazi
  -- strict thread matches above, loose matches on Subject: below --
2010-12-10 21:26 Stefano Bonifazi
2010-12-11 11:02 ` Blue Swirl
2010-12-11 12:29   ` Stefano Bonifazi
2010-12-11 13:11     ` Blue Swirl
2010-12-11 14:32       ` Stefano Bonifazi
2010-12-11 14:44         ` Blue Swirl
2010-12-14 20:17           ` Stefano Bonifazi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D335A31.2090105@gmail.com \
    --to=stefboombastic@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=taylor.lefevre@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).