LLVM-OTOOL(1)

πŸ“¦
version 16.0.6 Β· 3 versions
, in ubuntu noble

πŸ’– llvm-otool(1) β€” the Mach-O dumping tool, bestie edition πŸ’–

okay so. you found the llvm-otool manual page and honestly? you're about to have a great time. this is a page from the LLVM manual collection, and it's all about poking at Mach-O files like the absolute detective you are πŸ•΅οΈβ™€οΈβœ¨


🌸 NAME 🌸

llvm-otool β€” Mach-O dumping tool. that's it. that's the whole name. iconic, minimal, no notes. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

llvm-otool [option…] [file…]

options, files, go. very "we contain multitudes" of it.


πŸŽ€ DESCRIPTION πŸŽ€

so llvm-otool is a tool for dumping Mach-O files. Mach-O files are like… the little nested-onion situation macOS uses, and this thing unpeels them for you. πŸ§…

and the real tea? it attempts to be command-line-compatible and output-compatible with macOS's otool. so if you already know otool, you already lowkey know this. slay. πŸ”₯


✨ OPTIONS ✨

one bullet per flag, no skips, no shortcuts, because we do not leave the boring ones out in this house. πŸ‘‘

  • -arch <value> β€” pick a slice out of a universal Mach-O file. universal files are giving "many selves in one body" and this chooses which one you're talking to. 🌈
  • -chained_fixups β€” print the chained fixup information. fixups! but chained! πŸ”—
  • -C β€” print linker optimization hints. little helpful whispers from the linker. πŸ’¬
  • -dyld_info β€” print bind and rebase information. dyld's whole deal, laid bare. 🫢
  • -D β€” print the shared library id. who are you, library? πŸ’…
  • -d β€” print the data section. the data. the vibes. πŸ“
  • -f β€” print universal headers. the headers up top, but make them universal. 🌍
  • -G β€” print the data-in-code table. yes bestie, it's a table. πŸ“‹
  • --help-hidden β€” print help for hidden flags. the secret menu. the lore. πŸ‘€
  • --help β€” print help. the regular, non-secret menu. πŸŽ€
  • -h β€” print mach header. lowercase h, capital importance. ⭐
  • -I β€” print the indirect symbol table. indirect! like a situationship, but for symbols. 😭
  • -j β€” print opcode bytes. raw little bytes, unfiltered. πŸ’€
  • -L β€” print used shared libraries. the library guest list. πŸ’œ
  • -l β€” print load commands. (lowercase L, yes, careful β€” -I and -l are different and they will humble you.) 🧚
  • -mcpu=<value> β€” select cpu for disassembly. tell it which brain to use. 🧠
  • -o β€” print the Objective-C segment. the Obj-C corner of the world. 🌸
  • -P β€” print the __TEXT,__info_plist section as strings. plist but make it strings. ✨
  • -p <function name> β€” start disassembly at <function name>. jump straight to your fave function, main character behavior. πŸ‘‘
  • -r β€” print relocation entries. everything moves, nothing stays. πŸ¦‹
  • -s <segname> <sectname> β€” print contents of a section. two args, segment then section, in that order, don't flip them bestie. πŸ™ˆ
  • -t β€” print the text section. the text. the classics. πŸ“–
  • --version β€” print version. because sometimes you just need to know. πŸ’–
  • -V β€” symbolize disassembled operands (implies -v). yes it drags -v along with it, they're a package deal. 🫢
  • -v β€” verbose output / disassemble when printing text sections. loud and proud, and it disassembles for you when you're printing text sections. πŸ“£
  • -X β€” omit leading addresses or headers. minimalism era. clean lines, no clutter. πŸŽ€
  • -x β€” print all text sections. all of them. every last one. no crumbs. πŸ”₯
  • @<FILE> β€” read command-line options and commands from response file <FILE>. a file full of options? she's organized, she's efficient, she ate. πŸ’…

🌈 EXIT STATUS 🌈

okay so here's the vibe check:

  • if there's an error, llvm-otool exits with a non-zero exit code. 🚨
  • otherwise, it exits with code 0. we love a clean exit. πŸ’š

πŸ’€ BUGS πŸ’€

found a bug? not me being shocked, every tool has a day 😭 β€” to report bugs, please visit:

https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/

(and yes the original page has that URL split across a line with a hyphen-ish soft break; the link above is the one true link. go forth and file. 🫢)


πŸ¦„ SEE ALSO πŸ¦„

the whole friend group. go say hi. ✨


πŸ’œ AUTHOR πŸ’œ

Maintained by the LLVM Team (https://llvm.org/). we stan maintainers. 🫢


2003-2024, LLVM Project. periodt. πŸ’…


aaaand that's the page bestie!! this was page 15, dated 2024-04-14, from the LLVM source, filed under LLVM-OTOOL(1) β€” so like, if you need to cite it, that's your receipt 🧾✨ now go dump some Mach-O files and be the main character of your terminal πŸŒΈπŸ’–πŸŽ€

πŸ“¦ where this page comes from