7.2 Archive Member Headers

Each member (linker, longnames, or object-file member) is preceded by a header. An archive member header has the following format, in which each field is an ASCII text string that is left-justified and padded with spaces to the end of the field. There is no terminating null character in any of these fields.

Each member header starts on the first even address after the end of the previous archive member.

Offset Size Field Description
0 16 Name Name of archive member, with a slash (/) appended to terminate the name. If the first character is a slash, the name has a special interpretation, as described below.
16 12 Date Date and time the archive member was created: ASCII decimal representation of the number of seconds since 1/1/1970 UCT.
28 6 User ID ASCII decimal representation of the user ID.
34 6 Group ID ASCII group representation of the group ID.
40 8 Mode ASCII octal representation of the member's file mode.
48 10 Size ASCII decimal representation of the total size of the archive member, not including the size of the header.
58 2 End of Header The two bytes in the C string "‘\n".

The Name field has one of the formats shown in the following table. As mentioned above, each of these strings is left justified and padded with trailing spaces within a field of 16 bytes:

Contents of Name Field Description
name/ The field gives the name of the archive member directly.
/ The archive member is one of the two linker members. Both of the linker members have this name.
// The archive member is the longname member, which consists of a series of null-terminated ASCII strings. The longnames member is the third archive member, and must always be present even if the contents are empty.
/n The name of the archive member is located at offset n within the longnames member. The number n is the decimal representation of the offset. For example: "\26" indicates that the name of the archive member is located 26 bytes beyond the beginning of longnames member contents.