[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Possible?: statically converting i386 ELF object files
From: |
John Reiser |
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 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20040913) |
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, address@hidden