RANLIB(1)

πŸ“¦ version 2.45, in ubuntu questing

πŸŽ€ 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 @file option was, and that @file option 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 (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