summaryrefslogtreecommitdiff
path: root/static/unix-v10/man5/ar.5
blob: c5287fef156d093494a805ed8294d697cf83cf9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.pa 1
.he 'ARCHIVE (V)'3/15/72'ARCHIVE (V)'
.ti 0
NAME		archive (library) file format
.sp
.ti 0
DESCRIPTION	The
archive command ar__ is used to combine several files into
one.
Archives are used mainly as libraries to be searched
by the link-editor ld__.

A file produced by ar__
has a "magic number" at the start,
followed by the constituent files, each preceded by a file header.
The magic number is
177555(8)
(it was chosen to be unlikely to occur anywhere else).
The header of each file is 16 bytes long:

.in +5
.ti -3
0-7
.br
file name, null padded on the right

.ti -3
8-11
.br
Modification time of the file

.ti -3
12
.br
User ID of file owner

.ti -3
13
.br
file mode

.ti -3
14-15
.br
file size

.in -5
If the file is an odd number of bytes long, it is padded
with a null byte, but the size in the header is correct.

Notice there is no provision for empty areas in an archive
file.
.sp
.ti 0
SEE ALSO	ar__, ld__