xref: /original-bsd/usr.bin/ranlib/ranlib.5.5 (revision 93ab02a6)
1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)ranlib.5.5	5.2 (Berkeley) 05/10/91
7.\"
8.Dd
9.Dt RANLIB 5
10.Os
11.Sh NAME
12.Nm ranlib
13.Nd archive (library) table-of-contents format
14.Sh SYNOPSIS
15.Fd #include <ranlib.h>
16.Sh DESCRIPTION
17The archive table-of-contents command
18.Nm ranlib
19creates a table of contents for archives, containing object files, to
20be used by the link-editor
21.Xr ld 1 .
22It operates on archives created with the utility
23.Xr ar 1 .
24.Pp
25The
26.Nm Ranlib
27function
28prepends a new file to the archive which has three separate parts.
29The first part is a standard archive header, which has a special name
30field,  "__.SYMDEF".
31.Pp
32The second part is a ``long'' followed by a list of ranlib structures.
33The long is the size, in bytes, of the list of ranlib structures.
34Each of the ranlib structures consists of a zero based offset into the
35next section (a string table of symbols) and an offset from the beginning
36of the archive to the start of the archive file which defines the symbol.
37The actual number of ranlib structures is this number divided by the size
38of an individual ranlib structure.
39.Pp
40The third part is a ``long'' followed by a string table.
41The long is the size, in bytes of the string table.
42.Sh SEE ALSO
43.Xr ar 1 ,
44.Xr ranlib 1
45