qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Using native libraries
Date: Mon, 21 May 2007 14:13:37 -0700	[thread overview]
Message-ID: <46520B81.1000901@zytor.com> (raw)
In-Reply-To: <200705211511.01631.luke@dashjr.org>

Luke -Jr wrote:
> I'm sure someone's probably had a similar idea before, and it's probably not 
> practical for some reason I'm overlooking-- but is there a reason Qemu can't 
> dynamically translate library calls to use the native libraries instead of 
> requiring emulated libraries as well?

The easiest way to do that is by having an "RPC stub library" in the
emulated environment which contains nothing but trap instructions --
like system calls -- that can be intercepted on the other side.  At that
point, one has to do translation of data types and pointers (called
"thunking") before invoking the native library.  Generating such
"thunks" is usually done automatically, but it is still a fairly major
effort.

This kind of stuff is what underlies things like running PowerMac
applications on IntelMacs (or 68kmac apps on PowerMac).

	-hpa

  parent reply	other threads:[~2007-05-21 21:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 20:11 [Qemu-devel] Using native libraries Luke -Jr
2007-05-21 20:56 ` Carlos A. M. dos Santos
2007-05-21 21:13 ` H. Peter Anvin [this message]
2007-05-21 23:06   ` Luke -Jr
2007-05-22  6:12 ` Gwenole Beauchesne

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=46520B81.1000901@zytor.com \
    --to=hpa@zytor.com \
    --cc=qemu-devel@nongnu.org \
    /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).