Commit | Line | Data |
---|---|---|
923e9e63 KT |
1 | .TH AR 5 |
2 | .SH NAME | |
3 | ar \- archive (library) file format | |
4 | .SH SYNOPSIS | |
5 | .B #include <ar.h> | |
6 | .SH DESCRIPTION | |
7 | The archive command | |
8 | .I ar | |
9 | is used to combine several files into | |
10 | one. | |
11 | Archives are used mainly as libraries to be searched | |
12 | by the link-editor | |
13 | .I ld. | |
14 | .PP | |
15 | A file produced by | |
16 | .I ar | |
17 | has a magic number at the start, | |
18 | followed by the constituent files, each preceded by a file header. | |
19 | The magic number and header layout as described in the | |
20 | include file are: | |
21 | .RS | |
22 | .PP | |
23 | .nf | |
24 | .ta \w'#define 'u +\w'ARMAG 'u | |
25 | .so /usr/include/ar.h | |
26 | .fi | |
27 | .RE | |
28 | .LP | |
29 | The name is a null-terminated string; the date is in the | |
30 | form of | |
31 | .IR time (2); | |
32 | the user ID and group ID are numbers; the mode is a bit pattern | |
33 | per | |
34 | .IR chmod (2); | |
35 | the size is counted in bytes. | |
36 | .PP | |
37 | Each file begins on a word boundary; | |
38 | a null byte is inserted between files if necessary. | |
39 | Nevertheless the size given reflects the | |
40 | actual size of the file exclusive of padding. | |
41 | .PP | |
42 | Notice there is no provision for empty areas in an archive | |
43 | file. | |
44 | .SH "SEE ALSO" | |
45 | ar(1), ld(1), nm(1) | |
46 | .SH BUGS | |
47 | Coding user and group IDs as characters is a botch. |