watcom library format
watcom library format
Does anyone know what format Open Watcom uses for libraries, and whether it is documented?
We may be able to have an update to pdld to handle this format.
Thanks. Paul.
D:\watcom\lib386\nt>hexdump kernel32.lib 0 100
000000 F00D0000 7A010061 00000000 00000000 ....z..a........
000010 800D000B 5F6C7374 726C656E 5740343A ...._lstrlenW@4:
000020 88290080 A001000B 5F6C7374 726C656E .)......_lstrlen
000030 5740340C 4B45524E 454C3332 2E444C4C [email protected]
000040 086C7374 726C656E 57000056 880800C0 .lstrlenW..V....
000050 FE54E79C 7A451C8A 02000074 00000000 .T..zE.....t....
We may be able to have an update to pdld to handle this format.
Thanks. Paul.
D:\watcom\lib386\nt>hexdump kernel32.lib 0 100
000000 F00D0000 7A010061 00000000 00000000 ....z..a........
000010 800D000B 5F6C7374 726C656E 5740343A ...._lstrlenW@4:
000020 88290080 A001000B 5F6C7374 726C656E .)......_lstrlen
000030 5740340C 4B45524E 454C3332 2E444C4C [email protected]
000040 086C7374 726C656E 57000056 880800C0 .lstrlenW..V....
000050 FE54E79C 7A451C8A 02000074 00000000 .T..zE.....t....
-
- Member
- Posts: 5805
- Joined: Mon Mar 25, 2013 7:01 pm
Re: watcom library format
I think this varies with the type of source file used.
Re: watcom library format
An odd little section in our Watcom wiki page states, "Natively, all Watcom C/C++ compilers can produce is OMF (.obj) files by default."
However, I'm seeing different things from the Unix file command in a binary release of Watcom v2. Libraries (.lib) are OMF, while .obj files are "8086 relocatable (Microsoft)". So yes, the libraries are OMF but they're .lib not .obj.
However, I'm seeing different things from the Unix file command in a binary release of Watcom v2. Libraries (.lib) are OMF, while .obj files are "8086 relocatable (Microsoft)". So yes, the libraries are OMF but they're .lib not .obj.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
-
- Member
- Posts: 5805
- Joined: Mon Mar 25, 2013 7:01 pm
Re: watcom library format
"8086 relocatable (Microsoft)" is referring to the 8086 flavor of OMF with Microsoft's extensions.
The .lib files are probably also 8086 OMF with Microsoft extensions, but with enough additional headers that file didn't see the 8086-specific or Microsoft-specific parts.
Re: watcom library format
Thanks.Octocontrabass wrote: ↑Mon May 05, 2025 11:16 am "8086 relocatable (Microsoft)" is referring to the 8086 flavor of OMF with Microsoft's extensions.
Oh, file seems to think they come from MS Visual C specifically.Octocontrabass wrote: ↑Mon May 05, 2025 11:16 am The .lib files are probably also 8086 OMF with Microsoft extensions, but with enough additional headers that file didn't see the 8086-specific or Microsoft-specific parts.

lib386/wresfs.lib: Microsoft Visual C/OMF library, page size 16, at 0xde00 dictionary with 11 blocks (FFLAG=full) 1st entry FileShift in page 1, 2nd record "loadfind.c", 3rd record COMMENT Preserved class=0xaa
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Re: watcom library format
Thanks for that - that allowed us to progress.
Re: watcom library format
And pdld.exe, available (including public domain C90 source code) on the PDOS/386 disk at pdos.org, is now able to handle 32-bit OMF object code and libraries (at least to the extent that I use them as per makefile.pga).