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 for ranlib. it just tells you how to use it, lowkey helpful.
  • -v, -V, --version β€” show the version number of ranlib. vibe check the version ✨
  • -D β€” operate in deterministic mode πŸ”₯. the symbol map archive member's header will show zero for the UID, 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 -D option above: the archive index will get actual UID, 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 @file option. 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 (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