conversion ELF -> .EXE windows

Discussion in 'C Programming' started by christophe.4.news@gmail.com, Jan 31, 2008.

  1. Guest

    Hello,

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

    Thanks.
    , Jan 31, 2008
    #1
    1. Advertising

  2. santosh Guest

    wrote:

    > 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.
    santosh, Jan 31, 2008
    #2
    1. Advertising

  3. In article <fnr6c5$hdn$>, <> wrote:

    >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.
    --
    "Okay, buzzwords only. Two syllables, tops." -- Laurie Anderson
    Walter Roberson, Jan 31, 2008
    #3
  4. Guest

    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.
    , Jan 31, 2008
    #4
  5. In article <fnt288$nd8$>, <> wrote:

    >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.
    --
    "I will speculate that [...] applications [...] could actually see a
    performance boost for most users by going dual-core [...] because it
    is running the adware and spyware that [...] are otherwise slowing
    down the single CPU that user has today" -- Herb Sutter
    Walter Roberson, Jan 31, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Spike

    Watcom and ELF...

    Spike, Jul 23, 2004, in forum: C++
    Replies:
    1
    Views:
    400
    Christopher Benson-Manica
    Jul 23, 2004
  2. a_bogdan_marinescu

    PE and ELF libraries for Python

    a_bogdan_marinescu, Nov 21, 2003, in forum: Python
    Replies:
    0
    Views:
    307
    a_bogdan_marinescu
    Nov 21, 2003
  3. Bogdan Marinescu

    Looking for ELF/PE library for Python

    Bogdan Marinescu, Dec 11, 2003, in forum: Python
    Replies:
    1
    Views:
    443
    Miki Tebeka
    Dec 11, 2003
  4. John Benson

    ELF object file analysis tool in Python?

    John Benson, Mar 3, 2004, in forum: Python
    Replies:
    2
    Views:
    516
    Miki Tebeka
    Mar 3, 2004
  5. John Benson
    Replies:
    1
    Views:
    1,518
    Bob Ippolito
    Mar 7, 2004
Loading...

Share This Page