qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Reiser <jreiser@BitWagon.com>
To: qemu-devel@nongnu.org
Cc: Sebastian Nowozin <nowozin@gmail.com>
Subject: Re: [Qemu-devel] Possible?: statically converting i386 ELF object files to ARM ELF object files
Date: Tue, 19 Apr 2005 07:41:05 -0700	[thread overview]
Message-ID: <42651881.9070209@BitWagon.com> (raw)
In-Reply-To: <200504191249.33379.paul@codesourcery.com>

Paul Brook wrote:
> On Tuesday 19 April 2005 10:10, Sebastian Nowozin wrote:
   [snip]
>>I have wondered wether the code conversion ability of qemu could be
>>utilized to convert ELF .o object files compiled for i386 Linux by GCC
>>to .o object files for ARM/Linux.
   [snip]
>>(Half a dozen small object files, clearly named like MD2.o MD5.o SHA1.o, ...).


> The short answer is no,it's not possible.
   [snip]
> It would be possible to manually write thunks for a particular interface, but 
> it's a lot of work, and has to be redone for every interface.


The even shorter answer is:  Just do it.

For this particular library, with 6 to 10 particular _leaf_ (!!) functions
(functions that don't call any other functions) whose calling sequence
can be guessed, the translation is easy.  Once you get to where qemu
takes care of the tedious part (register and opcode mapping), the rest
(inserting the relocation directives for access to a few static 'const'
arrays) is easy.

-- 
John Reiser, jreiser@BitWagon.com

  reply	other threads:[~2005-04-19 14:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-19  9:10 [Qemu-devel] Possible?: statically converting i386 ELF object files to ARM ELF object files Sebastian Nowozin
2005-04-19 11:49 ` Paul Brook
2005-04-19 14:41   ` John Reiser [this message]
2005-04-19 15:53 ` Bob Deblier

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=42651881.9070209@BitWagon.com \
    --to=jreiser@bitwagon.com \
    --cc=nowozin@gmail.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).