conversion ELF -> .EXE windows

C

christophe.4.news

Hello,

Is there a free tool able to convert a *static* ELF executable (without
import table) into a Windows .EXE (PE) ?

Thanks.
 
S

santosh

Hello,

Is there a free tool able to convert a *static* ELF executable
(without import table) into a Windows .EXE (PE) ?

This is the wrong group. Try comp.sources.wanted or a web search.

Hint: Try 'objcopy' under GNU based systems.
 
W

Walter Roberson

Is there a free tool able to convert a *static* ELF executable (without
import table) into a Windows .EXE (PE) ?

Ummm, like a Playstation executable file? If so then that
is a non-trivial task, as Playstation is MIPS CPU based,
and MIPS uses a completely different machine language than
Windows for Intel type chips.

In theory if you had code that was not self-modifying, you
could read an ELF file with MIPS code as if it were a type
of source code, and compile that code for Windows. Not many
programs do it that way, though: emulators are more common.
 
C

christophe.4.news

Hello,

I've developped an application under Linux, that i want to port to
Windows (nothing to do with Playstation :)). By the way, one can always
(build... and) use a cross compiler to do the job.
But it does not seem to be the more obvious solution ...

Also, i have tried objcopy, but there is no windows PE target :-(
Maybe there is a way to add it, i don't know ?

Thanks.
 
W

Walter Roberson

I've developped an application under Linux, that i want to port to
Windows (nothing to do with Playstation :)). By the way, one can always
(build... and) use a cross compiler to do the job.
But it does not seem to be the more obvious solution ...

The operating systems calls are different between Linux and
Windows. It is not just a matter of extracting the machine code
from the ELF file and wrapping it into a .EXE file format:
the conversion program would have to detect each library call
and substitute a call to the appropriate Windows library.
You indicated earlier that the Linux binary was fully linked,
so everything in the Linux libc that it called upon would have
to be detected and converted to the appropriate Windows variation.
This is not always straight-forward: for example, the exact
parameters that you need to pass in Windows to create a network
socket are slightly different than what you need in Linux,
even though the routine name is the same and most of the parameters
are very close.

You may wish to load cygwin and MINGW onto the Windows box and use
it to recompile the Linux source.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top