qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Stefano Bonifazi <stefboombastic@gmail.com>
Cc: "Raphaël Lefèvre" <taylor.lefevre@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] TCG flow vs dyngen
Date: Mon, 24 Jan 2011 19:19:25 -0600	[thread overview]
Message-ID: <4D3E251D.3040302@landley.net> (raw)
In-Reply-To: <4D3DEC40.7020302@gmail.com>

On 01/24/2011 03:16 PM, Stefano Bonifazi wrote:
> Hi! Thanks for replying me!
>> The thing is, the kernel currently _does_ work, so studying the relevant
>> kernel code (and possibly the dynamic loader code) is one way to learn
>> how it currently works.
> Sorry what kernel? Qemu's? Linux's?

QEMU isn't a kernel, it's an emulator.  Linux is a kernel.

I meant Linux loads and runs Linux ELF executables.  That's pretty much
the definition of "how to do it".  So if there's ever a conflict between
"how qemu does it" and "how the Linux kernel does it", the Linux kernel
is going to win.  (And yes, this has come up before, for me it was
http://www.mail-archive.com/qemu-devel@nongnu.org/msg25336.html )

That said, QEMU's currently working fairly well on this front too, so
studying either should work pretty well...

One advantage of the kernel is "cat /proc/$PID/maps" which lets you know
what the mappings are, and then you can look up the appropriate chunks
of the executable and read the elf spec:

  http://refspecs.freestandards.org/elf/elf.pdf

And to be honest, the best way to get up to speed on this is to read this:

  http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html

Where some guy asked "ok, what do we actually NEED" and then set out to
prove it.

This book is pretty good too, although so dry it's almost unreadable.
You might have better luck getting a paper copy out of the library:

  http://www.iecc.com/linker/

Rob

  reply	other threads:[~2011-01-25  1:19 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           ` [Qemu-devel] " Stefano Bonifazi
2011-01-16 21:08             ` 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 [this message]
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=4D3E251D.3040302@landley.net \
    --to=rob@landley.net \
    --cc=qemu-devel@nongnu.org \
    --cc=stefboombastic@gmail.com \
    --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).