7. Archive (Library) File Format
The COFF archive format provides a standard mechanism for storing collections of object files. These collections are frequently referred to as "libraries" in programming documentation.
The first eight bytes of an archive consist of the file signature. The rest of the archive consists of a series of archive members, as follows:
- The first and second members are "linker members." Each has of these members has its own format as described in Section 8.3. Typically, a linker places information into these archive members. The linker members contain the directory of the archive.
- The third member is the longnames member. This member consists of a series of null-terminated ASCII strings, in which each string is the name of another archive member.
- The rest of the archive consists of standard (object-file) members. Each of these members contains the contents of one object file in its entirety.
An archive member header precedes each member. The following illustration shows the general structure of an archive:
Header |
Contents of OBJ File 1 (COFF format) |
Header |
Contents of OBJ File 2 (COFF format) |
Header |
Contents of OBJ File N (COFF format) |
Figure 4. Archive File Structure