The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: jack on June 30, 2005, 12:08:24 AM

Title: omf lib to coff conversion
Post by: jack on June 30, 2005, 12:08:24 AM
can someone point me to documentation on the omf and coff formats? what i really need is an omf lib to coff lib converter.
searching the web turned up nothing, Digital Mars C comes with a small utility "coff2omf" which converts a coff lib to omf.
Title: Re: omf lib to coff conversion
Post by: hutch-- on June 30, 2005, 01:33:14 AM
jack,

I have moved this topic to the workshop so you will get more answers.
Title: Re: omf lib to coff conversion
Post by: jack on June 30, 2005, 01:59:28 AM
thanks Hutch, searching the web i found some mention that Microsoft 16-bit lib supports omf objects, i'll have to some studying. :)
Title: Re: omf lib to coff conversion
Post by: hutch-- on June 30, 2005, 02:29:13 AM
jack,

The Microsoft linkers usually convert OMF to COFF and generate a warning while doing so. It seems its because they support both OMF and COFF so tis may be an easy way for you to do conversions of this type.
Title: Re: omf lib to coff conversion
Post by: Vortex on June 30, 2005, 10:37:43 AM
Hi jack,

Converting a single OMF object file is easy :

link -edit objfilename.obj


To convert a STATIC library ( OMF type ) , you need to extract all the member object modules, convert them to COFF and then rebuild the library.
Title: Re: omf lib to coff conversion
Post by: jack on June 30, 2005, 11:38:27 AM
how do you get the names of the objects in an omf lib?
I tried lib /list libname.lib with no result
Title: Re: omf lib to coff conversion
Post by: Vortex on June 30, 2005, 07:16:50 PM
You need to use the librarian from Digital Mars supporting OMF libraries:

lib -l libname.lib

This command creates a listing file named libname.lst . This file provides information about the names of object files.
Title: Re: omf lib to coff conversion
Post by: jack on June 30, 2005, 11:12:33 PM
thanks hutch and Vortex, one more question, are all the names returned valid objects?
for example
Quote
??0pDNameNode@@QAE@PAVDName@@@Z  undname
??0type_info@@AAE@ABV0@@Z        typinfo
??1exception@@UAE@XZ             stdexcpt
??1type_info@@UAE@XZ             typinfo
are they all needed to rebuild the lib or do i weed out the "undname" and  such.