News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

omf lib to coff conversion

Started by jack, June 30, 2005, 12:08:24 AM

Previous topic - Next topic

jack

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.

hutch--

jack,

I have moved this topic to the workshop so you will get more answers.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jack

thanks Hutch, searching the web i found some mention that Microsoft 16-bit lib supports omf objects, i'll have to some studying. :)

hutch--

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.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Vortex

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.

jack

how do you get the names of the objects in an omf lib?
I tried lib /list libname.lib with no result

Vortex

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.

jack

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.