It is known that Visual Studio library *.lib file is an Unix "ar" archive containing object modules in COFF format. But I found that libraries for importing DLL is an archive of small chunks (or stubs) that are not COFF objects. An example is the library VS15\lib\ucrt\ucrt.lib. These chunks contain the name of function and the reference to DLL library that defines this function. Here is an example (hex dump) of stub for "puts" function:
00-00-FF-FF-00-00-4C-01-39-E9-80-55-26-00-00-00 ......L.9..U&...
93-00-08-00-5F-70-75-74-73-00-61-70-69-2D-6D-73 “..._puts.api-ms
2D-77-69-6E-2D-63-72-74-2D-73-74-64-69-6F-2D-6C -win-crt-stdio-l
31-2D-31-2D-30-2E-64-6C-6C-00 1-1-0.dll.
It is definitely not COFF object (although it contains 386 architecture signature 0x14C specific to COFF). I can't find any documentation on the format of these import objects. Does anybody know this format?
May be unofficial specs?
May be some source code that can process this format?