7

I have installed Microsoft C 5.10 on DOS 6.22. It created a 'LIB' directory with static libraries to link against. Now I need to extract the symbols and the code for the functions from them, but can't find the format documented anywhere:

ninja@desktop:/mnt/d/backup/dos/msc510-install/LIB$ ls *.LIB
CLIBC7.LIB  CLIBCE.LIB  GRAPHICS.LIB  LLIBC7.LIB  LLIBCE.LIB  MLIBC7.LIB  MLIBCE.LIB  SLIBC7.LIB  SLIBCE.LIB
ninja@desktop:/mnt/d/backup/dos/msc510-install/LIB$ file CLIBC7.LIB
CLIBC7.LIB: Microsoft Visual C library

Supposedly, static libraries from more recent versions of (Visual) C are COFF archives which can be expanded with ar, but it does not seem to work for these legacy libraries.

0

1 Answer 1

14

These are OMF libraries; you can analyse them with Agner Fog’s object file converter.

It probably only makes sense to work with those libraries if you intend to build software with Microsoft C 5.1, in which case you’d use the tools provided with the compiler (LIB.EXE in particular).

The OMF format is described in detail in OMF: Relocatable Object Module Format.

3
  • yep OMF was and still is the standard ...
    – Spektre
    May 29, 2020 at 7:26
  • thanks, I'm trying to reverse engineer some old software built with that compiler, finding the library function signatures will make my life much easier. May 29, 2020 at 18:59
  • 3
    The GNU binutil's "objcopy" and "objdump" utilities could well be your friends here ... they can convert to and from many object file formats, including OMF.
    – occipita
    Jun 2, 2020 at 1:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .