I am a newbie when it comes to using machine code files!!!

I need to use a machine code executable obtained as ELF (Linux) into an exe file for Windows. I have tried 'objconv' but, though the format suggests to use '-fPE ', when I use that I get the command line indicates 'Error 2004 unknown command line' and 'Error 2103 cannot read input file'. I suspect that there is some incompatibility between Linus and Windows platforms

3

2 Answers

Although the underlying object code may be the same between the platforms, non-trivial native applications can't be binary-compatible between Windows and Linux.

If Linux executable you are trying to convert is dynamically linked, it would require the presence of libraries that don't exist on Windows (you can see this list of libraries by running ldd /path/to/program on the Linux machine).

Even if you converted all the libraries to PE executable format or statically linked them, the system calls to the NT Kernel and Linux kernel are completely different. There is no direct one-to-one correspondence between them.

You best option would be to find the source code for the original application if possible. If the program is written in a portable way, it may compile on both Windows and Linux. Even though the system calls are not the same between the two platforms, a subset of their C library implementations have standardized behaviour.

This is almost certainly not going to work. Linux and Windows do not play nice with one another. The application you are looking to "convert" will have to be rebuilt from source for Windows (which will require Windows specific patching). With any luck the application you are trying to run already has a Windows port.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy