RANLIB(1)

πŸ“¦
version 26.09 Β· 2 versions
, in nixpkgs unstable

πŸ’… RANLIB(1) πŸ’…

okay so this is the ranlib page from the GNU Development Tools manual, section 1 bestie, and honestly it's a little cutie. let's go ✨


🌸 NAME 🌸

ranlib β€” generate an index to an archive 🫢


✨ SYNOPSIS ✨

ranlib [--plugin name] [-DhHvVt] archive

that's it. that's the whole vibe. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

so what does ranlib actually do? bestie, it generates an index to the contents of an archive and stores that index right inside the archive itself. icon behavior. πŸ’…

that index lists every symbol defined by a member of the archive β€” specifically the members that are relocatable object files. no cap.

you can peek at this index with nm -s or nm --print-armap, if you're nosy like that πŸ™ˆ

and like… why do you even want this? because an archive with such an index speeds up linking to the library πŸ”₯ and it lets routines in the library call each other without regard to their placement in the archive. main character energy fr fr.

also important, don't skip this: the GNU ranlib program is literally another form of GNU ar. running ranlib is completely equivalent to executing ar -s. same thing. same girl. πŸ’–


πŸ¦‹ OPTIONS πŸ¦‹

  • -h, -H, --help β€” show usage information for ranlib. that's it, that's the whole job πŸŽ€
  • -v, -V, --version β€” show the version number of ranlib. slay, now you know what you're running ⭐
  • -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. lowkey obsessed with reproducibility ngl 🧚

if binutils was configured with --enable-deterministic-archives, then this mode is on by default. and you can turn it off with the -U option, described below πŸ‘‡

  • -t β€” update the timestamp of the symbol map of an archive. little refresh, little self-care moment 🌸
  • -U β€” do not operate in deterministic mode. this is the exact inverse of the -D option above: the archive index will get actual UID, GID, timestamp, and file mode values. so like, real values. the truth. πŸ’€

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. and listen β€” if file does not exist, or cannot be read, then the option will be treated literally, and not removed. so it just sits there being itself 🫢

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. and plot twist: the file may itself contain additional @file options β€” any such options will be processed recursively. it's giving inception 😭

ngl the @file thing is the most unhinged little feature and i love her for it πŸ’œ

🌈 SEE ALSO 🌈

go read them, i'll wait πŸ’–


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".


okay that's the whole page bestie, you ate that πŸ“

binutils-2.46.1 ✨ 1980-01-01 β€” mwah, that's the version and the date, and that's a wrap πŸ’…πŸ’–
πŸ“¦ where this page comes from