Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ar(5) — Ultrix-11 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

ld(1)

nm(1)

ar(5)

NAME

ar − archive (library) file format

SYNTAX

#include <ar.h>

DESCRIPTION

The ar command 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 and header layout as described in the include file are:

#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;
};

The name is a null-terminated string.  The date is in the form of time(2). The user ID and group ID are numbers.  The mode is a bit pattern per chmod(2). The size is counted in bytes.

Each file begins on a word boundary and 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. 

RESTRICTIONS

Coding user and group IDs as characters is a botch. 

SEE ALSO

ar(1), ld(1), nm(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026