RANLIB(1)
π RANLIB(1) β bestie edition π
okay so this is the GNU Development Tools page for ranlib, and no cap, it's shorter than you think but every flag matters. let's go π«Ά
β¨ NAME β¨
ranlib β generate an index to an archive
πΈ SYNOPSIS πΈ
ranlib [--plugin name] [-DhHvVt] archive
π¦ DESCRIPTION π¦
so like, ranlib generates an index of everything inside an archive and then stores that index right in the archive itself. the index lists every symbol defined by a member of the archive that is a relocatable object file. that's it, that's the whole job π
if you wanna peek at that index, you can use nm -s or nm --print-armap. it's right there, go look, iconic behavior.
why do we care? bc an archive with this index speeds up linking to the library. faster linking, happier life β¨
also important bestie: the GNU ranlib program is another form of GNU ar. running ranlib is completely equivalent to executing ar -s. same energy, same result, no cap. π
π OPTIONS π
-h,-H,--helpβ show usage information forranlib. it just tells you how to use it, lowkey helpful.-v,-V,--versionβ show the version number ofranlib. vibe check the version β¨-Dβ operate in deterministic mode π₯. the symbol map archive member's header will show zero for theUID,GID, and timestamp. when this option is used, multiple runs will produce identical output files. so consistent, so iconic.
if binutils was configured with --enable-deterministic-archives, then this mode is on by default. you can turn it off with the -U option, described below.
-tβ update the timestamp of the symbol map of an archive.-Uβ do not operate in deterministic mode. this is the inverse of the-Doption above: the archive index will get actualUID,GID, timestamp, and file mode values.
if binutils was configured without --enable-deterministic-archives, then this mode is on by default. π
@fileβ read command-line options from file. the options read are inserted in place of the original@fileoption. if file does not exist, or cannot be read, then the option will be treated literally, and not removed. π
options in file are separated by whitespace. a whitespace character may be included in an option by surrounding the entire option in either single or double quotes. any character (including a backslash) may be included by prefixing the character to be included with a backslash. the file may itself contain additional @file options; any such options will be processed recursively. it's giving nesting doll realness π§
ngl bestie, the @file thing is a whole little language. respect it.
π SEE ALSO π
π COPYRIGHT π
Copyright (c) 1991-2026 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; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
so yeah, that's the whole page bestie π go regenerate some indices, you got this π
signing off from binutils-2.47, dated 2026-09-05 β main character energy only, periodt β¨π¦π
π¦ where this page comes from
- ubuntu stonking: binutils-arm-none-eabi 1:2.47-6ubuntu1+33
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms