ZipPy
ZipPy

Reputation: 83

How to create executable coff file from a C source

I am trying to do a simulate with Simcore Alpha/Functional Simulator and I need to create an image file but it is giving an error like "This is not Coff Executable" how can I create an Executable Coff file from a C source in linux?

Upvotes: 0

Views: 4297

Answers (2)

R Samuel Klatchko
R Samuel Klatchko

Reputation: 76541

In order to do this, you'll need a cross compiling gcc that is built to output COFF files. You may need to build gcc yourself if you can't find a pre-built one.

After you download gcc, you will need to configure it. The important option is --target; so if you want to target an Alpha architecture you would do:

configure --target=alpha-coff

I would also recommend you add a prefix to the binaries and install them into a different directory so you have no problems with the compiler interacting with the system compiler:

configure --target=alpha-coff --prefix=/opt/cross-gcc --program-prefix=coff-

(this will create coff-gcc in /opt/cross-gcc/bin, you can tweak those if want something different).

Upvotes: 4

toto
toto

Reputation: 900

Linux executable format is called ELF. COFF is a common file format for object modules, which are linked to make an ELF file or an EXE file

In your case if you have access to gcc, you can try

gcc mysource.c -o myprogram

Upvotes: -3

Related Questions