RANLIB(5)

πŸ“¦
version 1010.6 Β· 3 versions
, in nixpkgs unstable

🌸 NAME 🌸

Okay bestie, this is RANLIB(5) from the File Formats Manual ✨ The name is ranlib β€” archive (library) table-of-contents format. Periodt πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <mach-o/ranlib.h>

πŸ’… DESCRIPTION πŸ’…

So the archive table-of-contents command ranlib creates a table of contents for archives, containing object files, to be used by the link-editor ld(1) πŸ’– It operates on archives created with the utility ar(1) β€” yes, that's the origin story.

The Ranlib function prepends a new file to the archive which has three separate parts πŸ”₯ The first part is a standard archive header, which has a special name field, "__.SYMDEF" or "__.SYMDEF SORTED" πŸŽ€ If the archive does not have multiple members that define symbol then "__.SYMDEF SORTED" should be used and the table of contents should be sorted by name β€” lowkey important, no cap.

The second part is a long followed by a list of ranlib structures. The long is the size, in bytes, of the list of ranlib structures. Each of the ranlib structures consists of a zero based offset into the next section (a string table of symbols) and an offset from the beginning of the archive to the start of the archive file which defines the symbol. The actual number of ranlib structures is this number divided by the size of an individual ranlib structure. Math girlie behavior, honestly 🧚

The third part is a long followed by a string table. The long is the size, in bytes of the string table. And that's the whole trio πŸ’œ

🌈 SEE ALSO 🌈

Go say hi to ar(1) and ranlib(1) β€” they're literally in the SEE ALSO squad 🫢


This page is from Darwin and is dated November 16, 2001 β€” mwah, enjoy the archive lore πŸ’‹

πŸ“¦ where this page comes from
  • nixpkgs unstable: cctools 1010.6
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms