1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- Copyright (C) 1991-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 7or any later version published by the Free Software Foundation; 8with no Invariant Sections, with no Front-Cover Texts, and with no 9Back-Cover Texts. A copy of the license is included in the 10section entitled "GNU Free Documentation License". 11 --> 12<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 13<head> 14<title>GNU Binary Utilities: ranlib</title> 15 16<meta name="description" content="GNU Binary Utilities: ranlib"> 17<meta name="keywords" content="GNU Binary Utilities: ranlib"> 18<meta name="resource-type" content="document"> 19<meta name="distribution" content="global"> 20<meta name="Generator" content="makeinfo"> 21<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 22<link href="index.html#Top" rel="start" title="Top"> 23<link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index"> 24<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 25<link href="index.html#Top" rel="up" title="Top"> 26<link href="size.html#size" rel="next" title="size"> 27<link href="objdump.html#objdump" rel="previous" title="objdump"> 28<style type="text/css"> 29<!-- 30a.summary-letter {text-decoration: none} 31blockquote.smallquotation {font-size: smaller} 32div.display {margin-left: 3.2em} 33div.example {margin-left: 3.2em} 34div.indentedblock {margin-left: 3.2em} 35div.lisp {margin-left: 3.2em} 36div.smalldisplay {margin-left: 3.2em} 37div.smallexample {margin-left: 3.2em} 38div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 39div.smalllisp {margin-left: 3.2em} 40kbd {font-style:oblique} 41pre.display {font-family: inherit} 42pre.format {font-family: inherit} 43pre.menu-comment {font-family: serif} 44pre.menu-preformatted {font-family: serif} 45pre.smalldisplay {font-family: inherit; font-size: smaller} 46pre.smallexample {font-size: smaller} 47pre.smallformat {font-family: inherit; font-size: smaller} 48pre.smalllisp {font-size: smaller} 49span.nocodebreak {white-space:nowrap} 50span.nolinebreak {white-space:nowrap} 51span.roman {font-family:serif; font-weight:normal} 52span.sansserif {font-family:sans-serif; font-weight:normal} 53ul.no-bullet {list-style: none} 54--> 55</style> 56 57 58</head> 59 60<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 61<a name="ranlib"></a> 62<div class="header"> 63<p> 64Next: <a href="size.html#size" accesskey="n" rel="next">size</a>, Previous: <a href="objdump.html#objdump" accesskey="p" rel="previous">objdump</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p> 65</div> 66<hr> 67<a name="ranlib-1"></a> 68<h2 class="chapter">5 ranlib</h2> 69 70<a name="index-ranlib-1"></a> 71<a name="index-archive-contents"></a> 72<a name="index-symbol-index-1"></a> 73 74 75<div class="smallexample"> 76<pre class="smallexample">ranlib [<samp>--plugin</samp> <var>name</var>] [<samp>-DhHvVt</samp>] <var>archive</var> 77</pre></div> 78 79 80<p><code>ranlib</code> generates an index to the contents of an archive and 81stores it in the archive. The index lists each symbol defined by a 82member of an archive that is a relocatable object file. 83</p> 84<p>You may use ‘<samp>nm -s</samp>’ or ‘<samp>nm --print-armap</samp>’ to list this index. 85</p> 86<p>An archive with such an index speeds up linking to the library and 87allows routines in the library to call each other without regard to 88their placement in the archive. 89</p> 90<p>The <small>GNU</small> <code>ranlib</code> program is another form of <small>GNU</small> <code>ar</code>; running 91<code>ranlib</code> is completely equivalent to executing ‘<samp>ar -s</samp>’. 92See <a href="ar.html#ar">ar</a>. 93</p> 94 95 96<dl compact="compact"> 97<dt><code>-h</code></dt> 98<dt><code>-H</code></dt> 99<dt><code>--help</code></dt> 100<dd><p>Show usage information for <code>ranlib</code>. 101</p> 102</dd> 103<dt><code>-v</code></dt> 104<dt><code>-V</code></dt> 105<dt><code>--version</code></dt> 106<dd><p>Show the version number of <code>ranlib</code>. 107</p> 108</dd> 109<dt><code>-D</code></dt> 110<dd><a name="index-deterministic-archives-4"></a> 111<a name="index-_002d_002denable_002ddeterministic_002darchives-4"></a> 112<p>Operate in <em>deterministic</em> mode. The symbol map archive member’s 113header will show zero for the UID, GID, and timestamp. When this 114option is used, multiple runs will produce identical output files. 115</p> 116<p>If <samp>binutils</samp> was configured with 117<samp>--enable-deterministic-archives</samp>, then this mode is on by 118default. It can be disabled with the ‘<samp>-U</samp>’ option, described 119below. 120</p> 121</dd> 122<dt><code>-t</code></dt> 123<dd><p>Update the timestamp of the symbol map of an archive. 124</p> 125</dd> 126<dt><code>-U</code></dt> 127<dd><a name="index-deterministic-archives-5"></a> 128<a name="index-_002d_002denable_002ddeterministic_002darchives-5"></a> 129<p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the 130inverse of the ‘<samp>-D</samp>’ option, above: the archive index will get 131actual UID, GID, timestamp, and file mode values. 132</p> 133<p>If <samp>binutils</samp> was configured <em>without</em> 134<samp>--enable-deterministic-archives</samp>, then this mode is on by 135default. 136</p> 137</dd> 138</dl> 139 140 141 142<hr> 143<div class="header"> 144<p> 145Next: <a href="size.html#size" accesskey="n" rel="next">size</a>, Previous: <a href="objdump.html#objdump" accesskey="p" rel="previous">objdump</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p> 146</div> 147 148 149 150</body> 151</html> 152