LLVM-OBJDUMP(1)

πŸ’… LLVM-OBJDUMP πŸ’…

okay bestie, so this is llvm-objdump, from the LLVM manual set (section 1, so it's a user command, iykyk). She's LLVM's object file dumper and she's literally the main character of your binary-inspection era. Let's get into it πŸŽ€


✨ NAME ✨

llvm-objdump β€” LLVM's object file dumper. That's it, that's the whole name. Iconic behavior, minimal introduction. πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So llvm-objdump prints out the contents of object files and final linked images, and you literally just name them on the command line. Obsessed.

If you don't give her a file name at all? She'll lowkey try to read from a.out. Yeah, just a.out, no thoughts. πŸ™ˆ

And if you use - as a file name? She'll process a file straight from her standard input stream. Slay, stdin representation. ✨


πŸ‘‘ COMMANDS πŸ‘‘

Okay so at least one of these commands is required β€” like, you can't just vibe in there with nothing. And some of them can be combined with other commands, which is honestly so generous of her. πŸ’–

  • -a, --archive-headers β€” Displays all the info living inside an archive's headers. Peek inside the box, bestie.
  • -d, --disassemble β€” Disassembles every executable section found in the input files. On some architectures (AArch64, PowerPC, x86), literally all known instructions get disassembled by default. On the others, you'll need --mcpu or --mattr to unlock some instruction sets β€” and the disabled instructions show up as <unknown> (the saddest little placeholder, no cap). 😭
  • -D, --disassemble-all β€” Disassembles all sections found in the input files. All of them. She's not picking favorites.
  • --disassemble-symbols=<symbol1[,symbol2,...]> β€” Disassembles only the symbols you name. Heads up: it takes demangled symbol names when you specify --demangle, otherwise it takes mangled symbol names. Implies --disassemble. Selective queen. πŸ‘‘
  • --dwarf=<value> β€” Dumps the DWARF debug sections you name. The supported values are:
    • frames β€” .debug_frame
  • -f, --file-headers β€” Displays the contents of the overall file header. The big picture, fr fr.
  • --fault-map-section β€” Displays the content of the fault map section. 🫢
  • -h, --headers, --section-headers β€” Displays summaries of the headers for each section. Little header summaries for each section, cute.
  • --help β€” Displays usage information and exits. Does not stack with other commands β€” she needs her alone time for this one. πŸ’…
  • -p, --private-headers β€” Displays format-specific file headers. Spicy, format-specific details.
  • -r, --reloc β€” Displays the relocation entries in the file.
  • -R, --dynamic-reloc β€” Displays the dynamic relocation entries in the file. Different reloc energy entirely.
  • --raw-clang-ast β€” Dumps the raw binary contents of the clang AST section. Raw. Unfiltered. 🫣
  • -s, --full-contents β€” Displays the contents of each section. Everything, out in the open.
  • -t, --syms β€” Displays the symbol table.
  • -T, --dynamic-syms β€” Displays the contents of the dynamic symbol table. ✨dynamic✨
  • -u, --unwind-info β€” Displays the unwind info of the input(s).
Heads up bestie: this operation is only currently supported for COFF and Mach-O object files. So if your file's in another format, she can't help you here 😭
  • -v, --version β€” Displays the version of the llvm-objdump executable. Does not stack with other commands β€” she's not multitasking during a version check.
  • -x, --all-headers β€” Displays all available header information. It's equivalent to specifying --archive-headers, --file-headers, --private-headers, --reloc, --section-headers, and --syms all at once. Combo move. πŸ”₯

✨ OPTIONS ✨

llvm-objdump supports the following options, and honestly, there are so many of them. Let's go πŸ’–

  • --adjust-vma=<offset> β€” Increases the displayed address in disassembly or section header printing by the offset you specify. Shift it, bestie.
  • --arch-name=<string> β€” Specifies the target architecture when disassembling. Use --version for a list of available targets. Pick your fighter. 🌈
  • --build-id=<string> β€” Looks up the object using the given build ID, specified as a hexadecimal string. The found object is handled as if it were an input filename. Sneaky but valid.
  • -C, --demangle β€” Demangles symbol names in the output. Names that actually make sense? Groundbreaking. ✨
  • --debug-file-directory <path> β€” Provides a path to a directory with a .build-id subdirectory, to search for debug information for stripped binaries. Multiple instances of this argument are searched in the order given β€” so order matters, fr fr.
  • --debuginfod, --no-debuginfod β€” Whether or not to try debuginfod lookups for debug binaries. Unless it's 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. Two conditions, no shortcuts. 🫢
  • --debug-vars=<format> β€” Prints the locations (in registers or memory) of source-level variables alongside disassembly. format may be unicode or ascii, and it defaults to unicode if omitted. Fancy by default, obviously. πŸ’…
  • --debug-vars-indent=<width> β€” The distance to indent the source-level variable display, relative to the start of the disassembly. Defaults to 52 characters. Very specific, very deliberate.
  • -j, --section=<section1[,section2,...]> β€” Performs commands on the specified sections only. For Mach-O, use segment,section to specify the section name. Precision vibes. 🎯
  • -l, --line-numbers β€” When disassembling, displays source line numbers. Implies --disassemble. Now you know exactly where you are.
  • -M, --disassembler-options=<opt1[,opt2,...]> β€” Passes target-specific disassembler options. The available options are:
    • reg-names-std β€” ARM only (default). Prints in ARM's instruction set documentation format, with r13/r14/r15 replaced by sp/lr/pc.
    • reg-names-raw β€” ARM only. Uses r followed by the register number.
    • no-aliases β€” AArch64 and RISC-V only. Prints the raw instruction mnemonic instead of the pseudo instruction mnemonic.
    • numeric β€” RISC-V only. Prints raw register names instead of ABI mnemonic (e.g. prints x1 instead of ra).
    • att β€” x86 only (default). Prints in the AT&T syntax.
    • intel β€” x86 only. Prints in the intel syntax.
  • --disassembler-color=<mode> β€” Enables or disables disassembler color output. The modes are:
    • off β€” Disable disassembler color output.
    • on β€” Enable disassembler color output.
    • terminal β€” Enable disassembler color output if the terminal supports it (default). She checks first, she's polite. 🌸
  • --mcpu=<cpu-name> β€” Targets a specific CPU type for disassembly. Specify --mcpu=help to display available CPUs. Window shopping but for CPUs.
  • --mattr=<a1,+a2,-a3,...> β€” Enables/disables target-specific attributes. Specify --mattr=help to display the available attributes. The +/- signs are literally doing the enabling/disabling, love that for them.
  • -mllvm <arg> β€” Specifies an argument to forward to LLVM's CommandLine library. Hand it off, she'll handle it.
  • --no-leading-addr, --no-addresses β€” When disassembling, don't print leading addresses for instructions or inline relocations. Clean, minimal, unbothered.
  • --no-print-imm-hex β€” Doesn't use hex format for immediate values in disassembly output. (The --print-imm-hex girlies are in shambles.)
  • --no-show-raw-insn β€” When disassembling, doesn't print the raw bytes of each instruction. Just the mnemonic, no exposed bytes. πŸ™ˆ
  • --offloading β€” Displays the content of the LLVM offloading sections and HIP offload bundles. Niche but she delivers.
  • --prefix=<prefix> β€” When disassembling with the --source option, prepends prefix to absolute paths. Path glow-up.
  • --prefix-strip=<level> β€” When disassembling with the --source option, strips out level initial directories from absolute paths. This option has no effect without --prefix β€” so don't come crying to her if you skipped that one. 😭
  • --print-imm-hex β€” Uses hex format when printing immediate values in disassembly output (default). Hex era, we're in it. πŸ”₯
  • -S, --source β€” When disassembling, displays source interleaved with the disassembly. Implies --disassemble. Source and machine code holding hands 🫢
  • --show-all-symbols β€” Shows all symbols during disassembly, even if multiple symbols are defined at the same location. No hiding, no merging.
  • --show-lma β€” Displays the LMA column when dumping ELF section headers. Defaults to off unless any section has different VMA and LMAs β€” in which case, she turns it on for you. Considerate.
  • --start-address=<address> β€” Multi-talented, listen:
    • 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.
  • --stop-address=<address> β€” Same energy, other end of the range:
    • 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.
  • --symbolize-operands β€” When disassembling, symbolizes a branch target operand to print a label instead of a real address. And 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, and X86. Know your limits, bestie.

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>

Literally a glow-up. ✨

  • --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 the pretty format would be printing block frequencies relative to the entry block, the same as BFI. πŸ’…

Only works when --symbolize-operands is enabled. Like, that's the whole prerequisite. Don't skip it.

  • --triple=<string> β€” The target triple to disassemble for; see --version for available targets.
  • -w, --wide β€” Ignored, purely for compatibility with GNU objdump. She's just being nice about it. πŸ’–
  • --x86-asm-syntax=<style> β€” Deprecated. When used with --disassemble, chooses the style of code to emit from the X86 backend. The supported values are:
    • att β€” AT&T-style assembly
    • intel β€” Intel-style assembly

The default disassembly style is att. (Deprecated, so, like, use it knowing that. πŸ‘€)

  • -z, --disassemble-zeroes β€” Do not skip blocks of zeroes when disassembling. Zeroes deserve screen time too.
  • @<FILE> β€” Reads command-line options and commands from response file <FILE>. Batching, but make it command line. πŸ¦‹

πŸ’… MACH-O ONLY OPTIONS AND COMMANDS πŸ’…

Mach-O besties, this whole little universe is yours β€” these commands and options are Mach-O specific, so keep that in mind and let’s go ✨

  • --arch=<architecture> β€” says which architecture to disassemble. Peep --version for the available architectures, no cap.
  • --archive-member-offsets β€” prints the offset to each archive member for Mach-O archives. It requires --archive-headers, so don’t forget that bestie.
  • --bind β€” displays binding info πŸ’…
  • --data-in-code β€” displays the data in code table.
  • --dis-symname=<name> β€” disassembles just the specified symbol’s instructions.
  • --chained-fixups β€” prints chained fixup information.
  • --dyld-info β€” prints bind and rebase information used by dyld to resolve external references in a final linked binary.
  • --dylibs-used β€” displays the shared libraries used for linked files.
  • --dsym=<string> β€” uses a .dSYM file for debug info.
  • --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. Use addrs (the default) to print only the addresses of functions, names to print only the names of the functions (when available), or both to print the names beside the addresses.
  • -g β€” prints line information from debug info if available.
  • --full-leading-addr β€” prints the full leading address when disassembling.
  • --indirect-symbols β€” displays the indirect symbol table.
  • --info-plist β€” displays the info plist section as strings.
  • --lazy-bind β€” displays lazy binding info.
  • --link-opt-hints β€” displays the linker optimization hints.
  • -m, --macho β€” uses the Mach-O specific object file parser. Commands and other options may behave differently when used with --macho.
  • --no-leading-headers β€” does not print any leading headers.
  • --no-symbolic-operands β€” does not print symbolic operands when disassembling.
  • --non-verbose β€” displays the information for Mach-O objects in non-verbose or numeric form.
  • --objc-meta-data β€” displays the Objective-C runtime meta data.
  • --private-header β€” displays only the first format specific file header.
  • --rebase β€” displays rebasing information.
  • --rpaths β€” displays runtime search paths for the binary.
  • --universal-headers β€” displays universal headers.
  • --weak-bind β€” displays weak binding information.

🌸 XCOFF ONLY OPTIONS AND COMMANDS 🌸

XCOFF crew, these two are for you β€” short and iconic πŸŽ€

  • --symbol-description β€” adds symbol description to disassembly output.
  • --traceback-table β€” decodes traceback table in disassembly output. Implies --disassemble.

πŸ’€ BUGS πŸ’€

To report bugs, please visit https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/ 🫢


πŸ” SEE ALSO πŸ”


πŸ‘‘ Author πŸ‘‘

Maintained by the LLVM Team (https://llvm.org/) 🧚


2003-2026, LLVM Project πŸ’–


okay that’s a wrap on page 21 of LLVM-OBJDUMP(1), dated 2026-05-15 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from