LLVM-OBJDUMP(1)

πŸ’– LLVM-OBJDUMP(1) β€” LLVM's object file dumper ✨

okay bestie, welcome to the LLVM manual, section 1, and today's main character is llvm-objdump πŸŽ€ she's the girl who opens up your object files and final linked images and tells you everything that's inside. no secrets. no cap. πŸ’…


🌸 NAME 🌸

llvm-objdump β€” LLVM's object file dumper πŸ¦‹


✨ SYNOPSIS ✨

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

πŸ’œ DESCRIPTION πŸ’œ

So basically, llvm-objdump prints the contents of the object files and final linked images you name on the command line. literally just hands you the tea β˜•

No file name given? She'll try to read from a.out β€” like, default behaviour, we love a fallback. πŸ™ˆ

And if you use - as a file name, she'll process a file on her standard input stream. icon behaviour, honestly. πŸ’…


πŸ‘‘ COMMANDS πŸ‘‘

At least one of these commands is required, and some commands can be stacked with other commands. mix and match, it's giving build-your-own-adventure 🌈

  • -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>. 😭
  • -D, --disassemble-all β€” Disassemble all sections found in the input files. all of them. every single one. πŸ’€
  • --disassemble-symbols=<symbol1[,symbol2,...]> β€” Disassemble only the specified symbols. Takes demangled symbol names when --demangle is specified, otherwise takes mangled symbol names. Implies --disassemble. 🎯
  • --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. ⚠️
  • -h, --headers, --section-headers β€” Display summaries of the headers for each section. πŸ“‹
  • --help β€” Display usage information and exit. Does not stack with other commands. πŸšͺ
  • -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. 🌳
  • -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. 🫢
  • -v, --version β€” Display the version of the llvm-objdump executable. Does not stack with other commands. 🏷️
  • -x, --all-headers β€” Display all available header information. Equivalent to specifying --archive-headers, --file-headers, --private-headers, --reloc, --section-headers, and --syms. the whole buffet, no notes πŸ“

πŸŽ€ OPTIONS πŸŽ€

llvm-objdump supports the following options:

  • --adjust-vma=<offset> β€” Increase the displayed address in disassembly or section header printing by the specified offset. πŸ“
  • --arch-name=<string> β€” Specify the target architecture when disassembling. Use --version for a list of available targets. πŸ—οΈ
  • --build-id=<string> β€” Look 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. πŸ”
  • -C, --demangle β€” Demangle symbol names in the output. un-mangle-ify that girl ✨
  • --debug-file-directory <path> β€” Provide 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. πŸ—ΊοΈ
  • --debug-indent=<width> β€” Distance to indent the source-level variable or inlined function display, relative to the start of the disassembly. Defaults to 52 characters. πŸ“
  • --debug-inlined-funcs[=<format>] β€” Print the locations of inlined functions alongside disassembly. format may be ascii, limits-only, or unicode, defaulting to unicode if omitted. πŸ’«
  • --debug-vars[=<format>] β€” Print the locations (in registers or memory) of source-level variables alongside disassembly. format may be ascii or unicode, defaulting to unicode if omitted. πŸ”Ž
  • --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. 🌐
  • -j, --section=<section1[,section2,...]> β€” Perform commands on the specified sections only. For Mach-O use segment,section to specify the section name. βœ‚οΈ
  • -l, --line-numbers β€” When disassembling, display source line numbers. Implies --disassemble. πŸ”’
  • -M, --disassembler-options=<opt1[,opt2,...]> β€” Pass target-specific disassembler options. Available options:
    • 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.
  • --disassembler-color=<mode> β€” Enable or disable disassembler color output. 🌈
    • off: Disable disassembler color output.
    • on: Enable disassembler color output.
    • terminal: Enable disassembler color output if the terminal supports it (default).
  • --mcpu=<cpu-name> β€” Target a specific CPU type for disassembly. Specify --mcpu=help to display available CPUs. 🧠
  • --mattr=<a1,+a2,-a3,...> β€” Enable/disable target-specific attributes. Specify --mattr=help to display the available attributes. πŸŽ›οΈ
  • -mllvm <arg> β€” Specify an argument to forward to LLVM's CommandLine library. πŸ“¨
  • --no-leading-addr, --no-addresses β€” When disassembling, do not print leading addresses for instructions or inline relocations. 🚫
  • --no-print-imm-hex β€” Do not use hex format for immediate values in disassembly output. πŸ™…
  • --no-show-raw-insn β€” When disassembling, do not print the raw bytes of each instruction. 🧼
  • --offloading β€” Display the content of the LLVM offloading sections and HIP offload bundles. πŸš€
  • --prefix=<prefix> β€” When disassembling with the --source option, prepend prefix to absolute paths. 🧩
  • --prefix-strip=<level> β€” When disassembling with the --source option, strip out level initial directories from absolute paths. This option has no effect without --prefix. βœ‚οΈ
  • --print-imm-hex β€” Use hex format when printing immediate values in disassembly output (default). πŸ”’
  • -S, --source β€” When disassembling, display source interleaved with the disassembly. Implies --disassemble. πŸ“œ
  • --show-all-symbols β€” Show all symbols during disassembly, even if multiple symbols are defined at the same location. πŸ‘―
  • --show-lma β€” Display the LMA column when dumping ELF section headers. Defaults to off unless any section has different VMA and LMAs. πŸ“Š
  • --start-address=<address> β€” When disassembling, only disassemble from the specified address.
    • When printing relocations, only print the relocations patching offsets from at least address.
    • When printing symbols, only print symbols with a value of at least address. 🚦
  • --stop-address=<address> β€” When disassembling, only disassemble up to, but not including the specified address.
    • When printing relocations, only print the relocations patching offsets up to address.
    • When printing symbols, only print symbols with a value up to address. πŸ›‘
  • --symbolize-operands β€” When disassembling, symbolize a branch target operand to print a label instead of a real address.
    • When printing a PC-relative global symbol reference, print 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. 🎯

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>
  • --pretty-pgo-analysis-map β€” When using --symbolize-operands with bb-address-map and pgo-analysis-map, print 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. 🫢
  • --triple=<string> β€” Target triple to disassemble for, see --version for available targets. 🎯
  • -w, --wide β€” Ignored for compatibility with GNU objdump. πŸ«₯ (yes she's just standing there, minding her business)
  • --x86-asm-syntax=<style> β€” Deprecated. When used with --disassemble, choose style of code to emit from X86 backend. Supported values are:
    • att β€” AT&T-style assembly
    • intel β€” Intel-style assembly

The default disassembly style is att. 🎨

  • -z, --disassemble-zeroes β€” Do not skip blocks of zeroes when disassembling. 0️⃣
  • @<FILE> β€” Read command-line options and commands from response file <FILE>. πŸ“₯

bestie we are not done yet β€” this page keeps going, and so do we πŸ’–

🍎 MACH-O ONLY OPTIONS AND COMMANDS 🍎

Okay bestie, this whole lil' section is Apple-coded πŸ’… β€” everything here is for Mach-O files, iykyk. Same rules tho: exact flags, exact behaviour, no made-up lore.

  • --arch=<architecture> β€” tells it which architecture to disassemble. Wanna know what architectures you've even got to pick from? Go peek at --version, it'll spill. ✨
  • --archive-member-offsets β€” prints the offset to each archive member for Mach-O archives. Heads up tho: this one requires --archive-headers to come along for the ride. πŸŽ€
  • --bind β€” shows you the binding info.
  • --data-in-code β€” displays the data in code table.
  • --dis-symname=<name> β€” disassembles just the instructions of the symbol you name. Only that one. Main character behaviour, honestly. πŸ‘‘
  • --chained-fixups β€” prints chained fixup information.
  • --dyld-info β€” prints the bind and rebase info that dyld uses to resolve external references in a final linked binary. πŸ¦‹
  • --dylibs-used β€” displays the shared libraries used for linked files.
  • --dsym=<string> β€” use 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. You can pick: addrs (that's the default) to print just the addresses of the functions, names to print just the names of the functions (when available), or both to print the names right next to the addresses. Pick your fighter. 🌸
  • -g β€” prints line information from debug info, if it's available.
  • --full-leading-addr β€” prints the full leading address when disassembling. No truncation, no crumbs, full meal. πŸ“
  • --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 β€” use the Mach-O specific object file parser. Real talk: commands and other options may behave differently when you use them with --macho. So don't be shocked, it's giving different on purpose. πŸ’€
  • --no-leading-headers β€” don't print any leading headers.
  • --no-symbolic-operands β€” don't print symbolic operands when disassembling.
  • --non-verbose β€” displays the info for Mach-O objects in non-verbose (aka 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 the runtime search paths for the binary.
  • --universal-headers β€” displays universal headers.
  • --weak-bind β€” displays weak binding information.

🌈 XCOFF ONLY OPTIONS AND COMMANDS 🌈

And now for the IBM-flavoured corner of the function, bestie β€” XCOFF only, no crossover episodes. 🧚

  • --symbol-description β€” adds symbol description to the disassembly output.
  • --traceback-table β€” decodes the traceback table in the disassembly output. And yes, it implies --disassemble, so it'll pull that in for you automatically. Convenient, iconic, no notes. ✨

πŸ› BUGS πŸ›

Found a bug? First of all, thank you for your service 🫢. Please go report it over at <<https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/>>.


πŸ‘€ SEE ALSO πŸ‘€


πŸ’– Author πŸ’–

Maintained by the LLVM Team (https://llvm.org/). They keep this whole thing fed and hydrated, fr fr.

2003-2026, LLVM Project. Respect the legacy, periodt. πŸ‘‘


And that's a wrap on LLVM-OBJDUMP(1)! This page came straight out of the LLVM source, dated 2026-07-16, and it was page 22 of the manual β€” a whole twenty-two pages of objdump excellence, slay. Go read your binaries, bestie, you've got this πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from