Commit | Line | Data |
---|---|---|
80baa34f KB |
1 | .\" Copyright (c) 1990, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
78a8129f | 3 | .\" |
eadcc84a | 4 | .\" %sccs.include.redist.roff% |
78a8129f | 5 | .\" |
80baa34f | 6 | .\" @(#)ranlib.5.5 8.1 (Berkeley) %G% |
78a8129f | 7 | .\" |
eadcc84a CL |
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 | |
78a8129f | 17 | The archive table-of-contents command |
eadcc84a | 18 | .Nm ranlib |
78a8129f KB |
19 | creates a table of contents for archives, containing object files, to |
20 | be used by the link-editor | |
eadcc84a | 21 | .Xr ld 1 . |
78a8129f | 22 | It operates on archives created with the utility |
eadcc84a CL |
23 | .Xr ar 1 . |
24 | .Pp | |
25 | The | |
26 | .Nm Ranlib | |
27 | function | |
78a8129f KB |
28 | prepends a new file to the archive which has three separate parts. |
29 | The first part is a standard archive header, which has a special name | |
30 | field, "__.SYMDEF". | |
eadcc84a | 31 | .Pp |
78a8129f KB |
32 | The second part is a ``long'' followed by a list of ranlib structures. |
33 | The long is the size, in bytes, of the list of ranlib structures. | |
34 | Each of the ranlib structures consists of a zero based offset into the | |
35 | next section (a string table of symbols) and an offset from the beginning | |
36 | of the archive to the start of the archive file which defines the symbol. | |
37 | The actual number of ranlib structures is this number divided by the size | |
38 | of an individual ranlib structure. | |
eadcc84a | 39 | .Pp |
78a8129f KB |
40 | The third part is a ``long'' followed by a string table. |
41 | The long is the size, in bytes of the string table. | |
eadcc84a CL |
42 | .Sh SEE ALSO |
43 | .Xr ar 1 , | |
44 | .Xr ranlib 1 |