RANLIB(1)

πŸ“¦
version 2.40.50~ti1ubuntu1 Β· 2 versions
, in ubuntu noble

✨ RANLIB(1) ✨

okay so bestie, welcome to ranlib β€” part of the GNU Development Tools lineup, and honestly? she's a quiet icon. no cap. πŸ’…


🌸 NAME 🌸

ranlib β€” generate an index to an archive. that's it, that's the whole vibe. an index-maker. a little librarian for your archives. πŸ“šβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

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

look at her. short. sweet. absolutely serving. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie: ranlib generates an index to the contents of an archive and stores it in the archive. she's not making a separate file, she's moving in. main character energy. πŸ‘‘

the index lists each symbol defined by a member of an archive that is a relocatable object file. every symbol, accounted for, slaying in its lane. ✨

you can peek at this index with nm -s or nm --print-armap. go look, she worked hard on it.

an archive with such an index speeds up linking to the library and allows routines in the library to call each other without regard to their placement in the archive. so basically the index is the group chat that makes sure everybody can find everybody. iconic behaviour. 🫢

and the plot twist: the GNU ranlib program is another form of GNU ar. running ranlib is completely equivalent to executing ar -s. same girl, different font. πŸ’…


⭐ OPTIONS ⭐

  • -h, -H, --help β€” show usage information for ranlib. you need help? she's got you. no judgement. πŸ™ˆ
  • -v, -V, --version β€” show the version number of ranlib. flex check. πŸ“’
  • -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. same input, same output, every single time β€” consistent 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. so if you're confused why it's already deterministic, that's why, bestie, mystery solved. πŸ”

  • -t β€” update the timestamp of the symbol map of an archive. just a lil touch-up. a timestamp refresh. self-care. πŸ’…
  • -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. real values, real messy, real honest. 😀

if binutils was configured without --enable-deterministic-archives, then this mode is on by default. yep, the default flips depending on how it was built β€” check your build, iykyk. πŸ‘€

  • @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. so she just shrugs and keeps it as-is. 🀷

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 files all the way down, bestie. πŸŒ€

⚠️ heads up: @file recursion is real β€” a file can pull in another file, which pulls in another file. it's giving inception. keep track of your references or you'll be lost in the sauce. πŸ’€

🌈 SEE ALSO 🌈

go read them, they're the extended universe. πŸ“–βœ¨


Copyright (c) 1991-2023 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!! this one came from binutils-2.40.50, dated 2023-07-04, and it's genuinely one of the shortest and sweetest man pages in the whole GNU Development Tools family. go index something. you got this. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from