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: Rob Landley
Subject: Re: [Qemu-devel] TCG flow vs dyngen
Date: Mon, 24 Jan 2011 19:19:25 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

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/address@hidden/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 via email to

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