ranlib(4) — Series 300/400 Only
NAME
ranlib − archive symbol table format for object libraries
SYNOPSIS
#include <ranlib.h>
DESCRIPTION
Any archive containing object files also includes an archive symbol table, thus allowing the linker (see ld(1)) to scan libraries in random (rather than sequential) order.
The archive symbol table (if it exists) is always the first file in the archive, but it is never listed. It is automatically created and/or updated by ar (see ar(1)).
The archive symbol table lists each externally known name in the archive, together with the offset of the archive element that defines that name. This offset is useful as an input argument to lseek() or fseek() (see lseek(2) and fseek(3S).
The archive symbol table file contains a header, a name pool of strings (the names of external symbols), and the archive symbol table. This allows for symbols with arbitrarily long names. The header contains a short integer which specifies the number of entries, and a long integer which specifies the size of the string table. Following this is the name pool. The last section of the file contains the archive symbol table entries. The structure of these entries is defined below:
typedef long off_t;
struct ranlib {
union {
off_t ran_strx; /* string table index */
char *ran_name;
} ran_un;
off_t ran_off; /* lib member offset */
};
SEE ALSO
Hewlett-Packard Company — HP-UX Release 9.0: August 1992