RANLIB(1)
β¨ ranlib β like, the manual page for it π
okay bestie, so this is RANLIB(1), part of the GNU Development Tools family, and honestly? she's a quiet icon. no drama, just vibes and symbol indexes. let's get into it π«Ά
πΈ NAME πΈ
ranlib β generate an index to an archive β¨
π SYNOPSIS π
ranlib [--plugin name] [-DhHvVt] archive
π¦ DESCRIPTION π¦
so what does she actually do? ranlib generates an index to the contents of an archive and stores it in the archive. that index lists every symbol defined by a member of an archive that is a relocatable object file. periodt. π
you can peek at that index with nm -s or nm --print-armap, btw β iykyk π
and why do we care? because an archive with such an index speeds up linking to the library. literally that's the whole point, she's a performance queen π
now here's the cute part: the GNU ranlib program is another form of GNU ar. running ranlib is completely equivalent to executing ar -s. same energy, different name. iconic π
β¨ OPTIONS β¨
-h,-H,--helpβ show usage information forranlib. that's it, that's the option. she's helpful and unbothered π-v,-V,--versionβ show the version number ofranlib. good for when you need to know exactly which one you're dealing with π-Dβ operate in deterministic mode. the symbol map archive member's header will show zero for theUID,GID, and timestamp. and with this option on, multiple runs will produce identical output files β reproducibility slay bestie π§
heads up: if binutils was configured with--enable-deterministic-archives, then this mode is on by default. you can turn it off with the-Uoption, described right below π
-tβ update the timestamp of the symbol map of an archive. tiny touch-up, no big deal π-Uβ do not operate in deterministic mode. this is the exact inverse of-Dabove: the archive index will get actualUID,GID, timestamp, and file mode values. raw and real, no filter π€
and if binutils was configured without --enable-deterministic-archives, then this mode is on by default. flip flop of the whole situation, love that for her π
@fileβ read command-line options from file. the options read are inserted in place of the original@fileoption. and if file doesn't exist, or can't be read? then the option will be treated literally, and not removed. no silent failures, no ghosting π
options in file are separated by whitespace. want whitespace inside an option? just surround the entire option in either single or double quotes. want literally any character (yes, even a backslash)? prefix the character you want with a backslash. and plot twist β the file may itself contain additional @file options, and any such options will be processed recursively. it's giving inception, and we're obsessed π
π₯ SEE ALSO π₯
π 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". π
and that's the whole page, no notes π this little legend comes to you from binutils-2.47, dated 2026-09-19 β so go forth, index that archive, and be the main character of your own link step. mwah π β¨πΈ
π¦ where this page comes from
- ubuntu stonking: binutils-sh-elf 2.47+3build2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms