RANLIB(5)
πΈ 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
- Copyright (c) 1990, 1991 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms