Find the answer to your Linux question:
Results 1 to 10 of 10
Hello, I hope someone can help me with this. I am trying to get an old unix program running on a ubuntu PC. The output from the file command says, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    2

    How to run COFF executable in current distro?


    Hello, I hope someone can help me with this.

    I am trying to get an old unix program running on a ubuntu PC. The output from the file command says, "80386 COFF executable". When I try and run the program I get the message, "cannot execute binary file".

    I have had this program runnung on RH 6.1 and RH 7.0 with the help of iBCS but now I am having a hard time getting it to run on ubuntu (2.6.8.1-3-386) or suse 9.1 (2.6.4-52-default) or RH 9.0. I understand that this compatibility should be handeled by ABI and this program should be able to run on all these distros but it does not sem to be working out of the box.

    Anyone know how to get this working? I need to get this old application running on a current linux distro, please help with some ideas on this.

  2. #2
    Just Joined!
    Join Date
    May 2005
    Location
    Melbourne, Australia
    Posts
    5

    Re: How to run COFF executable in current distro?

    Quote Originally Posted by TimSNL
    Hello, I hope someone can help me with this.

    I am trying to get an old unix program running on a ubuntu PC. The output from the file command says, "80386 COFF executable". When I try and run the program I get the message, "cannot execute binary file".
    ...SNIP...
    I have a similar problem. Did you ever find out how to run the COFF executable?

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    2
    no.
    The only solution for me seems to be to recode the application.

  4. #4
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    Isn't COFF an object file format (and not an executable binary)?
    You could try linking the object file (if that's what it is), something like:
    gcc file.o -o executable_name
    You might get some error about symbols, try various combinations of the switched "-nostdlib" and "-nostartfiles".
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  5. #5
    Just Joined!
    Join Date
    May 2005
    Location
    Melbourne, Australia
    Posts
    5
    No, COFF is indeed an executable binary format from older SCO unix systems. I believe that id should be possible to run these executables on linux, but any references to doing so are reasonably old and refer to kernel 2.4

    Thanks for your interest.

    -nb

  6. #6
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    COFF is basically an object file format; though it was used by earlier versions of UNIX as a binary executable file format itself - the expansion of COFF itself tells you that it's just an object file format - Common Object File Format.

    It was abandoned long time ago as a binary executable file format - replaced by ELF(Executable and Linkable Format).

    COFF doesn't have the additional section headers that are required for modern-day OSs to setup the process space properly.

    Anyways, you can convert from COFF to ELF using the objcopy tool.
    Read the man page of objcopy for more details.

    HTH
    The Unforgiven
    Registered Linux User #358564

  7. #7
    Just Joined!
    Join Date
    May 2005
    Location
    Melbourne, Australia
    Posts
    5
    Thank you for the information ... I based my reply on the fact that the COFF file is executable on a SCO Unix system!

    But, it's one step forward ... shuffle backwards a bit!

    Code:
    angus tmp # objcopy -O elf32-i386 drun
    objcopy: drun: File format not recognized
    Any more thoughts would be appreciated.

    -nb

  8. #8
    Just Joined!
    Join Date
    May 2005
    Location
    Melbourne, Australia
    Posts
    5
    An update,

    Thinking for a few minutes lead to trying the objcopy step on the SCO box.

    Success the file is converted and is executable on the target linux system

    Failure: it segfaults!

    Don't you just love how these systems give just enough to keep you interested in solving the problem?

    -nb

  9. #9
    Just Joined! filippos's Avatar
    Join Date
    Jul 2005
    Location
    Athena, Ellas
    Posts
    21

    alas! I have the same problem

    what happened to the old iBCS or ABI-Linux after SCO war to linux ?

  10. #10
    Just Joined!
    Join Date
    May 2005
    Location
    Melbourne, Australia
    Posts
    5

    COFF on linux

    As far as I can tell this functionality can be built into the current kernel and I have succeded in doing this (see previous post) However, I haven't been able to get past the segfault and cannot find any useful documentation to assist.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •