RANLIB(1)

πŸ“¦
version 2.44 Β· 3 versions
, in debian trixie

✨ RANLIB(1) ✨

okay bestie, gather round, because we're talking about ranlib β€” a little icon from the GNU Development Tools lineup and honestly? she's doing so much with so little. πŸ’…


πŸ’– NAME πŸ’–

ranlib β€” generate an index to an archive


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: ranlib generates an index to the contents of an archive and stores it in the archive. like, right inside her. no cap. 🌸

that index lists every symbol defined by a member of an archive that is a relocatable object file. every single one. she's thorough like that.

you can peek at this index with nm -s or nm --print-armap β€” go look, she worked hard on it. πŸ‘‘

and why do we care? because an archive with such an index speeds up linking to the library and lets routines in the library call each other without regard to their placement in the archive. mutual support, community, friendship. the vibe is immaculate. 🫢

also, iconic fact: the GNU ranlib program is another form of GNU ar β€” running ranlib is completely equivalent to executing ar -s. same girl, different outfit. ✨


πŸ”₯ OPTIONS πŸ”₯

  • -h
  • -H
  • --help β€” show usage information for ranlib. the "what do i even do" button. πŸ’–
  • -v
  • -V
  • --version β€” show the version number of ranlib. identity reveal. πŸŽ€
  • -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. consistency queen. πŸ‘‘

if binutils was configured with --enable-deterministic-archives, then this mode is on by default. it can be disabled with the -U option, described below. (iykyk)

  • -t β€” update the timestamp of the symbol map of an archive. freshen her up a lil. ⭐
  • -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. chaotic, authentic, main character energy. 🌈

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. (she said "i'll just be my own thing then." πŸ™ˆ)

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. yes girl, she goes deeper. πŸŒ€


🌸 SEE ALSO 🌸

ar(1), nm(1), and the Info entries for binutils. go read your other besties' pages too, they miss you. πŸ’œ


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; 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". πŸ“œβœ¨


and that's the whole page, bestie β€” every flag, every default, every legal footnote, untouched. don't ever say i gatekeep. πŸ’…

mwah πŸ’‹ this was binutils-2.44, dated 2025-03-28, and it's page RANLIB(1) β€” catch you on the next man page, love you, bye!! πŸ¦‹πŸŽ€πŸ’–

πŸ“¦ where this page comes from