1*62197Sbostic.\" Copyright (c) 1990, 1991, 1993 2*62197Sbostic.\" The Regents of the University of California. All rights reserved. 346015Sbostic.\" 449648Scael.\" %sccs.include.redist.roff% 546015Sbostic.\" 6*62197Sbostic.\" @(#)ranlib.5.5 8.1 (Berkeley) 06/06/93 746015Sbostic.\" 849648Scael.Dd 949648Scael.Dt RANLIB 5 1049648Scael.Os 1149648Scael.Sh NAME 1249648Scael.Nm ranlib 1349648Scael.Nd archive (library) table-of-contents format 1449648Scael.Sh SYNOPSIS 1549648Scael.Fd #include <ranlib.h> 1649648Scael.Sh DESCRIPTION 1746015SbosticThe archive table-of-contents command 1849648Scael.Nm ranlib 1946015Sbosticcreates a table of contents for archives, containing object files, to 2046015Sbosticbe used by the link-editor 2149648Scael.Xr ld 1 . 2246015SbosticIt operates on archives created with the utility 2349648Scael.Xr ar 1 . 2449648Scael.Pp 2549648ScaelThe 2649648Scael.Nm Ranlib 2749648Scaelfunction 2846015Sbosticprepends a new file to the archive which has three separate parts. 2946015SbosticThe first part is a standard archive header, which has a special name 3046015Sbosticfield, "__.SYMDEF". 3149648Scael.Pp 3246015SbosticThe second part is a ``long'' followed by a list of ranlib structures. 3346015SbosticThe long is the size, in bytes, of the list of ranlib structures. 3446015SbosticEach of the ranlib structures consists of a zero based offset into the 3546015Sbosticnext section (a string table of symbols) and an offset from the beginning 3646015Sbosticof the archive to the start of the archive file which defines the symbol. 3746015SbosticThe actual number of ranlib structures is this number divided by the size 3846015Sbosticof an individual ranlib structure. 3949648Scael.Pp 4046015SbosticThe third part is a ``long'' followed by a string table. 4146015SbosticThe long is the size, in bytes of the string table. 4249648Scael.Sh SEE ALSO 4349648Scael.Xr ar 1 , 4449648Scael.Xr ranlib 1 45