Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

ld(1)

ar(4)

RANLIB(4)

Series 300 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 ld 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.

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(2) or fseek(3). 

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;
structranlib {
union {
off_t ran_strx;/∗ string table index ∗/
char ∗ran_name;
} ran_un;
off_tran_off;/∗ lib member offset ∗/
};

SEE ALSO

ar(1), ld(1), ar(4). 

Hewlett-Packard Company  —  May 11, 2021

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