DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

cof2elf(CP)


cof2elf -- COFF to ELF object file translation

Syntax

cof2elf [-iqV] [-Q{yn}] [-s directory] files

Description

cof2elf(CP) converts one or more COFF object files to ELF. This translation occurs in place, meaning that the original file contents are modified. If an input file is an archive, each member is translated as necessary, and the archive is rebuilt with its members in the original order. cof2elf does not change input files that are not COFF.

Options have the following meanings.


-i
Normally, the files are modified only when full translation occurs. Unrecognized data, such as unknown relocation types, are treated as errors and prevent translation. With the -i flag, cof2elf ignores these partial translation conditions and modifies the file anyway.

-q
Normally, cof2elf prints a message for each file it examines, telling whether the file was translated, ignored, and so forth. The -q flag (for quiet) suppresses these messages.

-Q arg
If arg is y, identification information about cof2elf is added to the output files. This can be useful for software administration. Giving n for arg explicitly asks for no such information, which is the default behavior.

-s directory
As mentioned above, cof2elf modifies the input files. This option saves a copy of the original files in the specified directory, which must exist. cof2elf does not save files that it does not modify.

-V
This flag tells cof2elf to print a version message on standard error.

Warning

Some debugging information is discarded. Although this does not affect the behavior of a running program, it can affect the information available for symbolic debugging.

cof2elf translates only COFF relocatable files. It does not translate executable or static shared library files for two main reasons. First, the operating system supports executable files and static shared libraries, making translation unnecessary. Second, those files have specific address and alignment constraints determined by the file format. Matching the constraints with a different object file format is problematic.

When possible, recompile the source code to build new object files. cof2elf is provided for those times when source code is unavailable.

See also

a.out(FP), ar(FP), elf(S), ld(CP)

Standards conformance

cof2elf(CP) is an extension of AT&T System V that is maintained by The SCO Group.
© 2005 Commands for Programming (CP)
SCO OpenServer Release 6.0.0 -- 02 June 2005