RANLIB(1)
π RANLIB(1) β GNU Development Tools π
Okay bestie, this is the manual page for ranlib from the GNU Development Tools crew, and it's giving index-your-archive realness β¨π
π§ NAME π§
ranlib - generate an index to an archive π
πΈ SYNOPSIS πΈ
ranlib [--plugin name] [-DhHvVt] archive
π DESCRIPTION π
Okay so ranlib makes an index of everything inside an archive and tucks it right back into that same archive π¦β¨ The index lists each symbol defined by a member of the archive that is a relocatable object file. Iconic behaviour, no notes π«Ά
You can peek at this index with nm -s or nm --print-armap π
An archive with this index is lowkey a speed boost when linking to the library π It also lets routines in the library call each other no matter where they sit in the archive. Not me being impressed by this every single time ππ₯
Also, the GNU ranlib program is just another face of GNU ar. Running ranlib is completely equivalent to running ar -s π
Same energy, different name.
π¦ OPTIONS π¦
-h,-H,--helpβ Shows you the usage info for ranlib π-v,-V,--versionβ Shows the version number of ranlib π-Dβ Switches on deterministic mode π The symbol map archive member's header will show zero for the UID, GID, and timestamp, so multiple runs produce identical output files. Literally the dream for reproducible builds π₯Ή
If binutils was configured with --enable-deterministic-archives, then this mode is already on by default. You can turn it off with the -U option, down below π
-tβ Updates the timestamp of the symbol map of an archive β-Uβ Turns deterministic mode off. This is the inverse of-D: the archive index gets the real UID, GID, timestamp, and file mode values π
If binutils was configured without --enable-deterministic-archives, then this mode is on by default.
@fileβ Reads command-line options from file π The options read get slotted in right where the original@fileoption was, and that@fileoption disappears. If file doesn't exist or can't be read, then the option gets treated literally and is NOT removed. Oof π
Options inside file are separated by whitespace. To sneak a whitespace character into an option, wrap the whole option in either single or double quotes. Any character (yes, even a backslash) can be included by putting a backslash in front of it π¦ The file can also contain more @file options, and those get processed recursively. Russian-doll energy πͺ
β οΈ Heads up: if the @file can't be read, the option is treated literally and stays put. Don't expect it to vanish on you.
π SEE ALSO π
ar(1), nm(1), and the Info entries for binutils ππ«Ά
π COPYRIGHT π
Copyright (c) 1991-2025 Free Software Foundation, Inc. π
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation. There are no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License" π
Okay bestie, that's the whole tea β This page is from binutils-2.45, last updated 2025-12-03, and it's all RANLIB(1) πΈπ§β¨ Stay iconic, love you ππ«Ά
π¦ where this page comes from
- ubuntu questing: binutils-common 2.45-7ubuntu1.2
- ubuntu questing: binutils-x86-64-linux-gnu 2.45-7ubuntu1.2
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms