LLVM-OBJDUMP(1)

πŸ“¦ version 23.1.3, in centos-stream 9

🌸 NAME 🌸

okay so this is LLVM-OBJDUMP(1) from the LLVM manual, and the star of the show is llvm-objdump β€” literally LLVM's object file dumper, no cap. Bestie, if you've ever wanted to peek inside an object file like it's a group chat screenshot, this is the tool. πŸ’–


✨ SYNOPSIS ✨

llvm-objdump [commands] [options] [filenames...]

πŸ¦‹ DESCRIPTION πŸ¦‹

The llvm-objdump utility prints the contents of object files and final linked images named on the command line. Basically: you point it at files, it spills the tea about what's inside. πŸ‘‘

If no file name is specified, llvm-objdump will attempt to read from a.out. And if - is used as a file name, llvm-objdump will process a file on its standard input stream. Yes, bestie, the dash is a whole mood: stdin realness. 🫢


πŸ› οΈ COMMANDS πŸ› οΈ

At least one of the following commands is required, and some commands can be combined with other commands. Like, you can't just show up with vibes and zero commands β€” pick at least one, okay? πŸ’…

  • -a, --archive-headers β€” Display the information contained within an archive's headers. πŸŽ€
  • -d, --disassemble β€” Disassemble all executable sections found in the input files. On some architectures (AArch64, PowerPC, x86), all known instructions are disassembled by default. On the others, --mcpu or --mattr is needed to enable some instruction sets. Disabled instructions are displayed as <unknown>. so if you see <unknown>, that's the "not invited to the instruction-set party" energy 😭
  • -D, --disassemble-all β€” Disassemble all sections found in the input files. Not just executable ones β€” all of them, periodt.
  • --disassemble-symbols=<symbol1[,symbol2,...]> β€” Disassemble only the specified symbols. Takes demangled symbol names when --demangle is specified, otherwise takes mangled symbol names. Implies --disassemble. πŸ¦‹
  • --disassemble=symbol1 --disassemble=symbol2 ... β€” The other way to ask for that same "only these symbols" disassembly. Takes demangled symbol names when --demangle is specified, otherwise takes mangled symbol names, and it implies --disassemble. iykyk: same rules, different spelling.
  • --dwarf=<value> β€” Dump the specified DWARF debug sections. The supported values are:
    • frames β€” .debug_frame
  • -f, --file-headers β€” Display the contents of the overall file header. 🌈
  • --fault-map-section β€” Display the content of the fault map section. fault map section said "let me introduce myself" ✨
  • -h, --headers, --section-headers β€” Display summaries of the headers for each section. πŸŽ€
  • --help β€” Display usage information and exit. Does not stack with other commands. So don't try to make it do double duty, bestie.
  • -p, --private-headers β€” Display format-specific file headers. πŸ’œ
  • -r, --reloc β€” Display the relocation entries in the file. πŸ”₯
  • -R, --dynamic-reloc β€” Display the dynamic relocation entries in the file. ⭐
  • --raw-clang-ast β€” Dump the raw binary contents of the clang AST section. raw binary AST content, no filter, main character energy πŸ‘‘
  • -s, --full-contents β€” Display the contents of each section. πŸ“
  • -t, --syms β€” Display the symbol table. 🧚
  • -T, --dynamic-syms β€” Display the contents of the dynamic symbol table. πŸ’«
  • -u, --unwind-info β€” Display the unwind info of the input(s). This operation is only currently supported for COFF and Mach-O object files. so don't come for it with other formats, it's not ready 😭
  • -v, --version β€” Display the version of the llvm-objdump executable. Does not stack with other commands. Same rule as --help: one job at a time, diva.
  • -x, --all-headers β€” Display all available header information. Equivalent to specifying --archive-headers, --file-headers, --private-headers, --reloc, --section-headers, and --syms. it's giving "all the headers, all at once" and honestly? iconic. πŸ’…

✨ OPTIONS ✨

okay so llvm-objdump supports the following options β€” yes, bestie, all of them, grab a snack πŸ“:

  • --adjust-vma=<offset> β€” bumps the displayed address in disassembly or section header printing by the offset you give it. little address glow-up πŸ’…
  • --arch-name=<string> β€” tells it which target architecture to disassemble for. use --version for a list of available targets. pick your fighter ✨
  • --build-id=<string> β€” looks up the object using the build ID you pass as a hexadecimal string. the found object is handled as if it were an input filename. very β€œfound my missing piece” energy 🫢
  • -C, --demangle β€” demangles symbol names in the output. no more cursed name soup πŸ’–
  • --debug-file-directory <path> β€” gives it a path to a directory with a .build-id subdirectory, so it can search for debug information for stripped binaries. multiple instances of this argument are searched in the order given. lineup matters πŸ‘‘
  • --debug-indent=<width> β€” how far to indent the source-level variable or inlined function display, relative to the start of the disassembly. defaults to 52 characters. yes, that specific πŸŽ€
  • --debug-inlined-funcs[=<format>] β€” prints the locations of inlined functions alongside disassembly. format may be ascii, limits-only, or unicode, defaulting to unicode if omitted. cute little extras while you read πŸ”₯
  • --debug-vars[=<format>] β€” prints the locations (in registers or memory) of source-level variables alongside disassembly. format may be ascii or unicode, defaulting to unicode if omitted. literal variable lore 🌸
  • --debuginfod, --no-debuginfod β€” whether or not to try debuginfod lookups for debug binaries. unless specified, debuginfod is only enabled if libcurl was compiled in (LLVM_ENABLE_CURL) and at least one server URL was provided by the environment variable DEBUGINFOD_URLS. environment variable said what it said πŸ’€
  • -j, --section=<section1[,section2,...]> β€” only performs commands on the specified sections. for Mach-O, use segment,section to specify the section name. stay in your lane, bestie ✨
  • -l, --line-numbers β€” when disassembling, displays source line numbers. implies --disassemble. yes, it comes with the disassembly, like a matching set πŸŽ€
  • -M, --disassembler-options=<opt1[,opt2,...]> β€” passes target-specific disassembler options. available options are:
    • reg-names-std: ARM only (default). print in ARM's instruction set documentation, with r13/r14/r15 replaced by sp/lr/pc.
    • reg-names-raw: ARM only. use r followed by the register number.
    • no-aliases: AArch64 and RISC-V only. print raw instruction mnemonic instead of pseudo instruction mnemonic.
    • numeric: RISC-V only. print raw register names instead of ABI mnemonic. (e.g. print x1 instead of ra)
    • att: x86 only (default). print in the AT&T syntax.
    • intel: x86 only. print in the intel syntax.

choose your aesthetic, iykyk πŸ’…

  • --disassembler-color=<mode> β€” enables or disables disassembler color output. modes are:
    • off: disable disassembler color output.
    • on: enable disassembler color output.
    • terminal: enable disassembler color output if the terminal supports it (default).

color coordination but for instructions 🌈

  • --mcpu=<cpu-name> β€” targets a specific CPU type for disassembly. specify --mcpu=help to display available CPUs. main character CPU selection πŸ‘‘
  • --mattr=<a1,+a2,-a3,...> β€” enables/disables target-specific attributes. specify --mattr=help to display the available attributes. plus and minus girlies rise πŸ¦‹
  • -mllvm <arg> β€” specifies an argument to forward to LLVM's CommandLine library. passing the aux cord to LLVM 🎧
  • --no-leading-addr, --no-addresses β€” when disassembling, does not print leading addresses for instructions or inline relocations. no address intro, just the content ✨
  • --no-print-imm-hex β€” does not use hex format for immediate values in disassembly output. not everything needs to be hex, okay 😭
  • --no-show-raw-insn β€” when disassembling, does not print the raw bytes of each instruction. we’re keeping it clean 🧼
  • --offloading β€” displays the content of the LLVM offloading sections and HIP offload bundles. offloading section reveal 🌟
  • --prefix=<prefix> β€” when disassembling with the --source option, prepends prefix to absolute paths. path makeover πŸ’…
  • --prefix-strip=<level> β€” when disassembling with the --source option, strips out level initial directories from absolute paths. this option has no effect without --prefix. no prefix, no power 🫢
  • --source-dir <dir> β€” when disassembling with the --source option, adds dir to the front of the source search path when looking up source files. for each source file, llvm-objdump tries the path from the debug info, then each search directory with the full path appended, then each search directory with only the file name. this option may be specified multiple times; each --source-dir adds one directory. options on the command line are searched in first to last order. source file scavenger hunt πŸ”
  • --substitute-path <from> <to> β€” when disassembling with the --source option, replaces from with to at the start of the directory part of source file paths when looking up sources. a rule is applied only if from ends at a directory separator in the path. this option may be specified multiple times; rules are evaluated in the order given and the first matching rule is used, as in GDB set substitute-path. path remix, but make it rules-based πŸŽ€
  • --print-imm-hex β€” uses hex format when printing immediate values in disassembly output (default). hex is the default bestie, no cap πŸ’œ
  • -S, --source β€” when disassembling, displays source interleaved with the disassembly. implies --disassemble. source and disassembly holding hands 🫢
  • --show-all-symbols β€” shows all symbols during disassembly, even if multiple symbols are defined at the same location. everybody gets their moment πŸ‘‘
  • --show-lma β€” displays the LMA column when dumping ELF section headers. defaults to off unless any section has different VMA and LMAs. LMA gets a seat at the table πŸͺ‘βœ¨
  • --start-address=<address> β€” when disassembling, only disassembles from the specified address. when printing relocations, only prints the relocations patching offsets from at least address. when printing symbols, only prints symbols with a value of at least address. starting line, but literal 🎬
  • --stop-address=<address> β€” when disassembling, only disassembles up to, but not including, the specified address. when printing relocations, only prints the relocations patching offsets up to address. when printing symbols, only prints symbols with a value up to address. cutoff queen πŸ‘‘
  • --symbolize-operands, --no-symbolize-operands β€” when disassembling, symbolizes a branch target operand to print a label instead of a real address. when printing a PC-relative global symbol reference, prints it as an offset from the leading symbol. when a bb-address-map section is present (i.e., the object file is built with -fbasic-block-address-map), labels are retrieved from that section instead. if a pgo-analysis-map is present alongside the bb-address-map, any available analyses are printed after the relevant block label. by default, any analysis with a special representation (i.e. BlockFrequency, BranchProbability, etc) are printed as raw hex values. only supported for AArch64, BPF, PowerPC, RISC-V, and X86. enabled by default for BPF; use --no-symbolize-operands to disable. this one is doing the MOST, and honestly? iconic πŸ’…

example: a non-symbolized branch instruction with a local target and pc-relative memory access like

cmp eax, dword ptr [rip + 4112]
jge 0x20117e <_start+0x25>

might become

<L0>:
  cmp eax, dword ptr <g>
  jge      <L0>

labels said β€œi’ll be taking that” ✨

  • --pretty-pgo-analysis-map β€” when using --symbolize-operands with bb-address-map and pgo-analysis-map, prints analyses using the same format as their analysis passes would. an example of pretty format would be printing block frequencies relative to the entry block, the same as BFI. only works when --symbolize-operands is enabled. pretty privilege, but for PGO analysis 🌸
  • --triple=<string> β€” target triple to disassemble for. see --version for available targets. triple check the triple πŸ¦‹
  • -w, --wide β€” ignored for compatibility with GNU objdump. it’s giving β€œI’m here but not doing anything” πŸ’€
  • --x86-asm-syntax=<style> β€” Deprecated. when used with --disassemble, choose style of code to emit from the X86 backend. supported values are:
    • att β€” AT&T-style assembly
    • intel β€” Intel-style assembly

the default disassembly style is att. deprecated but still showing up to the group chat 🫠

  • -z, --disassemble-zeroes β€” do not skip blocks of zeroes when disassembling. zeroes stay included, periodt ✨
  • @<FILE> β€” read command-line options and commands from response file <FILE>. response file said β€œI’ll speak for the options” πŸŽ€

🍎 MACH-O ONLY OPTIONS AND COMMANDS

Okay bestie, this whole next chunk is Apple-flavored β€” Mach-O only, no cap. If you're not poking at a Mach-O binary these are just gonna vibe there doing nothing. πŸ’…

  • --arch=<architecture> β€” Picks which architecture to disassemble. Wanna know which ones you actually have? Check --version, it lists them all. ✨
  • --archive-member-offsets β€” Prints the offset to each archive member for Mach-O archives. Heads up though: this one requires --archive-headers, so bring a friend. 🫢
  • --bind β€” Displays binding info. That's it, that's the whole gig.
  • --data-in-code β€” Shows the data in code table. πŸŽ€
  • --dis-symname=<name> β€” Disassembles just the instructions of the symbol you name. One symbol. Main character energy only. πŸ‘‘
  • --chained-fixups β€” Prints chained fixup information.
  • --dyld-info β€” Prints bind and rebase information that dyld uses to resolve external references in a final linked binary. (dyld is literally out here doing the most, and this shows you its receipts. 🧾)
  • --dylibs-used β€” Displays the shared libraries used for linked files.
  • --dsym=<string> β€” Uses a .dSYM file for debug info. Yes, that's the debug-symbol bundle, go get your line numbers. πŸ¦‹
  • --dylib-id β€” Displays the shared library's ID for dylib files.
  • --exports-trie β€” Displays exported symbols.
  • --function-starts [=<addrs|names|both>] β€” Prints the function starts table for Mach-O objects. You get to choose the flavor:
    • addrs β€” print only the addresses of functions. This is the default, iykyk.
    • names β€” print only the names of the functions, when they're available.
    • both β€” print the names right beside the addresses. Best of both worlds, honestly iconic. ⭐
  • -g β€” Prints line information from debug info, if it's available. Fingers crossed it is. πŸ™ˆ
  • --full-leading-addr β€” Prints the full leading address when disassembling. No truncation, no shortcuts. πŸ”₯
  • --indirect-symbols β€” Displays the indirect symbol table.
  • --info-plist β€” Displays the info plist section as strings. πŸ“
  • --lazy-bind β€” Displays lazy binding info. (It's not actually being lazy, it's just the name, don't come for me.)
  • --link-opt-hints β€” Displays the linker optimization hints. Little love notes from the linker, basically. πŸ’Œ
  • -m, --macho β€” Uses the Mach-O specific object file parser. Fair warning: commands and other options may behave differently when you use them with --macho, so don't be shocked when things look different. 😭
  • --no-leading-headers β€” Prints no leading headers at all. Straight to the point. πŸ’€
  • --no-symbolic-operands β€” Doesn't print symbolic operands when disassembling. Raw operands only, no symbolism.
  • --non-verbose β€” Displays the info for Mach-O objects in non-verbose or numeric form. Numbers, not paragraphs. πŸ”’
  • --objc-meta-data β€” Displays the Objective-C runtime meta data. 🍎✨
  • --private-header β€” Displays only the first format specific file header. Just the one. First only. Don't ask for more.
  • --rebase β€” Displays rebasing information.
  • --rpaths β€” Displays the runtime search paths for the binary.
  • --universal-headers β€” Displays universal headers. 🌈 (Universal! Multi-arch! All the architectures living together in harmony!)
  • --weak-bind β€” Displays weak binding information.

πŸ—‚οΈ XCOFF ONLY OPTIONS AND COMMANDS

And these two are the XCOFF girlies β€” different file format, different rules. 🌸

  • --symbol-description β€” Adds symbol description to the disassembly output. Extra detail, because context is everything. πŸ’œ
  • --traceback-table β€” Decodes the traceback table in the disassembly output. And surprise! It implies --disassemble, so you get disassembly whether you asked for it or not. 🎁

πŸ› BUGS

Found a bug? First of all, thank you for your service. πŸ’– Report it here:

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

The LLVM team genuinely wants to hear about it, so don't be shy. 🫢


πŸ‘€ SEE ALSO

Go read these too, they're all in the same friend group:


✍️ AUTHOR

Maintained by the LLVM Team (https://llvm.org/). Shoutout to them, fr fr. πŸ‘‘


2003-2026, LLVM Project β€” that's the whole copyright line, bestie, keep it safe. πŸŽ€


and that's a wrap on the whole page! πŸ’…βœ¨ This one's from the LLVM-OBJDUMP(1) man page, section 23, dated 2026-10-06 β€” go forth and dump some objects, you gorgeous genius. πŸ¦‹πŸ’–πŸŒΈ

πŸ“¦ where this page comes from