1*01869ca4Swiz.\" $NetBSD: ranlib.5,v 1.7 2017/07/03 21:30:59 wiz Exp $ 2a5786dc4Stv.\" 3a5786dc4Stv.\" Copyright (c) 1990, 1991, 1993 4a5786dc4Stv.\" The Regents of the University of California. All rights reserved. 5a5786dc4Stv.\" 6a5786dc4Stv.\" Redistribution and use in source and binary forms, with or without 7a5786dc4Stv.\" modification, are permitted provided that the following conditions 8a5786dc4Stv.\" are met: 9a5786dc4Stv.\" 1. Redistributions of source code must retain the above copyright 10a5786dc4Stv.\" notice, this list of conditions and the following disclaimer. 11a5786dc4Stv.\" 2. Redistributions in binary form must reproduce the above copyright 12a5786dc4Stv.\" notice, this list of conditions and the following disclaimer in the 13a5786dc4Stv.\" documentation and/or other materials provided with the distribution. 14075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors 15a5786dc4Stv.\" may be used to endorse or promote products derived from this software 16a5786dc4Stv.\" without specific prior written permission. 17a5786dc4Stv.\" 18a5786dc4Stv.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19a5786dc4Stv.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20a5786dc4Stv.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21a5786dc4Stv.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22a5786dc4Stv.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23a5786dc4Stv.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24a5786dc4Stv.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25a5786dc4Stv.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26a5786dc4Stv.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27a5786dc4Stv.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28a5786dc4Stv.\" SUCH DAMAGE. 29a5786dc4Stv.\" 30a5786dc4Stv.\" from: @(#)ranlib.5.5 8.1 (Berkeley) 6/6/93 31a5786dc4Stv.\" 32a5786dc4Stv.Dd June 6, 1993 33a5786dc4Stv.Dt RANLIB 5 34a5786dc4Stv.Os 35a5786dc4Stv.Sh NAME 36a5786dc4Stv.Nm ranlib 37a5786dc4Stv.Nd a.out archive (library) table-of-contents format 38a5786dc4Stv.Sh SYNOPSIS 39472351e1Swiz.In ranlib.h 40a5786dc4Stv.Sh DESCRIPTION 41a5786dc4StvThe archive table-of-contents command 42a5786dc4Stv.Nm 43a5786dc4Stvcreates a table of contents for archives, containing object files, to 44a5786dc4Stvbe used by the link-editor 45a5786dc4Stv.Xr ld 1 . 46a5786dc4StvIt operates on archives created with the utility 47a5786dc4Stv.Xr ar 1 . 48a5786dc4Stv.Pp 49a5786dc4StvThe 50a5786dc4Stv.Nm 51a5786dc4Stvfunction 52a5786dc4Stvprepends a new file to the archive which has three separate parts. 53a5786dc4StvThe first part is a standard archive header, which has a special name 54a5786dc4Stvfield, "__.SYMDEF". 55a5786dc4Stv.Pp 5671e62d7dSlukemThe second part is a 5771e62d7dSlukem.Dq long 5871e62d7dSlukemfollowed by a list of ranlib structures. 59a5786dc4StvThe long is the size, in bytes, of the list of ranlib structures. 60a5786dc4StvEach of the ranlib structures consists of a zero based offset into the 61a5786dc4Stvnext section (a string table of symbols) and an offset from the beginning 62a5786dc4Stvof the archive to the start of the archive file which defines the symbol. 63a5786dc4StvThe actual number of ranlib structures is this number divided by the size 64a5786dc4Stvof an individual ranlib structure. 65a5786dc4Stv.Pp 6671e62d7dSlukemThe third part is a 6771e62d7dSlukem.Dq long 6871e62d7dSlukemfollowed by a string table. 69a5786dc4StvThe long is the size, in bytes of the string table. 70a5786dc4Stv.Sh SEE ALSO 71a5786dc4Stv.Xr ar 1 , 72a5786dc4Stv.Xr ranlib 1 73a5786dc4Stv.Sh BUGS 74a5786dc4StvThe 75*01869ca4Swiz.Tn <ranlib.h> 76a5786dc4Stvheader file, and the 776ad1c679Swiz.Nm 78a5786dc4Stvmanual page, do not describe the table-of-contents used by ELF systems, which 79a5786dc4Stvis that from the 80a5786dc4Stv.At V.4 81a5786dc4StvABI. 82