qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Using native libraries


From: H. Peter Anvin
Subject: Re: [Qemu-devel] Using native libraries
Date: Mon, 21 May 2007 14:13:37 -0700
User-agent: Thunderbird 2.0.0.0 (X11/20070419)

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




reply via email to

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