3 ar \- archive (library) file format
9 is used to combine several files into
11 Archives are used mainly as libraries to be searched
18 has a magic string at the start,
19 followed by the constituent files, each preceded by a file header.
20 The magic number and header layout as described in the
24 .ta \w'#define 'u +\w'SAR_HDR 'u
26 #define ARMAG "!<arch>\n"
46 is a blank-padded string.
51 to help verify the presence of a header.
52 The other fields are left-adjusted, blank-padded numbers.
53 They are decimal except for
56 The date is the modification date of the file (see
58 at the time of its insertion into the archive.
59 The mode is the low 9 bits of the file permission mode.
60 The length of the header is
64 structure is padded in an architecture-dependent manner,
65 the structure should never be read or written as a unit;
66 instead, each field should be read or written independently.
68 Each file begins on an even (0 mod 2) boundary;
69 a newline is inserted between files if necessary.
73 actual size of the file exclusive of padding.
75 When all members of an archive are object files of
76 the same architecture,
78 automatically adds an extra file, named
80 as the first member of the archive. This file
81 contains an index used by the loaders to locate all
82 externally defined text and data symbols in the archive.
84 There is no provision for empty areas in an archive
96 fields are unused in Plan 9.
97 They provide compatibility with Unix