1*49648Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California. 246015Sbostic.\" All rights reserved. 346015Sbostic.\" 4*49648Scael.\" %sccs.include.redist.roff% 546015Sbostic.\" 6*49648Scael.\" @(#)ranlib.5.5 5.2 (Berkeley) 05/10/91 746015Sbostic.\" 8*49648Scael.Dd 9*49648Scael.Dt RANLIB 5 10*49648Scael.Os 11*49648Scael.Sh NAME 12*49648Scael.Nm ranlib 13*49648Scael.Nd archive (library) table-of-contents format 14*49648Scael.Sh SYNOPSIS 15*49648Scael.Fd #include <ranlib.h> 16*49648Scael.Sh DESCRIPTION 1746015SbosticThe archive table-of-contents command 18*49648Scael.Nm ranlib 1946015Sbosticcreates a table of contents for archives, containing object files, to 2046015Sbosticbe used by the link-editor 21*49648Scael.Xr ld 1 . 2246015SbosticIt operates on archives created with the utility 23*49648Scael.Xr ar 1 . 24*49648Scael.Pp 25*49648ScaelThe 26*49648Scael.Nm Ranlib 27*49648Scaelfunction 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". 31*49648Scael.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. 39*49648Scael.Pp 4046015SbosticThe third part is a ``long'' followed by a string table. 4146015SbosticThe long is the size, in bytes of the string table. 42*49648Scael.Sh SEE ALSO 43*49648Scael.Xr ar 1 , 44*49648Scael.Xr ranlib 1 45