From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9akz-0001Tj-Bc for qemu-devel@nongnu.org; Mon, 29 Jun 2015 11:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9aku-0002TG-AF for qemu-devel@nongnu.org; Mon, 29 Jun 2015 11:14:01 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:32937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9aku-0002TC-2c for qemu-devel@nongnu.org; Mon, 29 Jun 2015 11:13:56 -0400 Received: by wiwl6 with SMTP id l6so103147749wiw.0 for ; Mon, 29 Jun 2015 08:13:55 -0700 (PDT) Date: Mon, 29 Jun 2015 16:13:52 +0100 From: Stefan Hajnoczi Message-ID: <20150629151352.GA24772@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] QEMU to generate host binary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ayaz Akram Cc: Peter Crosthwaite , qemu-devel@nongnu.org --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jun 28, 2015 at 07:29:39PM -0400, Ayaz Akram wrote: > > Let's say qemu is running in System Emulation Mode, when it runs guest's > > binary, it can log the translated code for host. Is it possible to merge > > that translated code and other sections of guest's binary to make a binary > > which can be run directly on host. No, because of self-modifying code, run-time code loading, etc. It is not possible to statically translate an executable (in the general case). There are architectures where it is possible due to restrictions (e.g. no code loading, all jump destinations are known in advance, etc) but the popular x86, ARM, etc architectures allow too much freedom to be amenable to static translation. Stefan --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVkWCwAAoJEJykq7OBq3PIX9EH/jq6Azo+fpb1aQF0mJGamUO+ F+3Hs89Lwgaqh9WlHE507RJB4382jrlZXm9fvWrlCN0mKt76iT4San2Nk0+NYdNn oF8EcNA1tWP1g8ym1ftwlCwdnRYOB3q7ND2rmjCceR/mTii0UORtXPA6HCEA4Qa7 2IzyDaw12cRReTIgMdye5bgBSxU5zzQWuUHnWyD9IXdpG2Z60m032Y/lMgaBiT9y jTUJsK4AWHYND+zmHx6DKEVnw2gNhOkketdb+PZvlRUm71JudeE4U55Ntu2J4bcO Id9tmsPXrd5G6u2t5Lz3058A3xYxYk8fx1mXwzPWI/sva/XULUpZmFG/Q7XGXH4= =DSMk -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--