RANLIB(1)
π 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 forranlib. that's it, that's the whole job π-v,-V,--versionβ show the version number ofranlib. 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-Doption 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 π
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
- nixpkgs unstable: coreboot-toolchain-aarch64 26.09
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms