AR(5)
NAME
ar − archive file format
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(1).
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 0177545(octal) (it was chosen to be unlikely to occur anywhere else). The header of each file is 26 bytes long:
#define ARMAG 0177545
struct ar_hdr {
char ar_name[14];
long ar_date;
char ar_uid;
char ar_gid;
int ar_mode;
long ar_size;
};
Each file begins on a word boundary; a null byte is inserted between files if necessary. Nevertheless the size given reflects the actual size of the file exclusive of padding.
Notice there is no provision for empty areas in an archive file.
SEE ALSO
BUGS
The archive header structure is not compatible between the PDP-11 and the VAX-11/780, due to the different word sizes. See arcv(1) to convert between machines.
NOTE TO AUX USERS
DOMAIN archive format is equivalent to VAX-11/780 format.