LLVM-OBJDUMP(1)

🌸 NAME 🌸

llvm-objdump β€” the LLVM object file dumper, aka your bestie for peeking inside object files and final linked images. This is the llvm-objdump(1) page from the LLVM crew, and we're gonna read it together, okay? πŸ’…


✨ SYNOPSIS ✨

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

πŸ’– DESCRIPTION πŸ’–

Okay so llvm-objdump prints the contents of object files and final linked images named on the command line. 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. Iconic behavior, honestly. ✨


πŸŽ€ COMMANDS πŸŽ€

At least one of the following commands is required, bestie β€” and some commands can be combined with other commands. Slay. πŸ’…

  • -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. No picking favorites. πŸ’–
  • --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. It's giving "give me everything" energy. πŸ‘‘

πŸ¦‹ OPTIONS πŸ¦‹

llvm-objdump supports the following options, bestie. Buckle up. 🌈

  • --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. ✨
  • --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. πŸ“
  • --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. 🌐
  • --debug-vars=<format> β€” print the locations (in registers or memory) of source-level variables alongside disassembly. format may be unicode or ascii, defaulting to unicode if omitted. πŸ”¬
  • --debug-vars-indent=<width> β€” distance to indent the source-level variable display, relative to the start of the disassembly. Defaults to 52 characters. πŸ“
  • -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 section. πŸš€
  • --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 works with PowerPC objects or X86 linked images.

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. 🀝
  • --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>. πŸ“„

🍎 MACH-O ONLY OPTIONS AND COMMANDS 🍎

Okay bestie, this next bit is Apple-specific. If you're poking at Mach-O binaries, this is your section, and it's giving main character energy.

  • --arch=<architecture> β€” pick which architecture you wanna disassemble. Wanna know which ones you actually have? Run --version, it'll tell you. πŸ’…
  • --archive-member-offsets β€” prints the offset to each archive member for Mach-O archives. Heads up tho: it requires --archive-headers. No cap.
  • --bind β€” show the binding info.
  • --data-in-code β€” shows the data in code table.
  • --dis-symname=<name> β€” disassemble just that one symbol's instructions. Just the one. Iconic.
  • --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 β€” shows the shared libraries used for linked files.
  • --dsym=<string> β€” use a .dSYM file for debug info.
  • --dylib-id β€” shows the shared library's ID, for dylib files.
  • --exports-trie β€” shows the exported symbols.
  • --function-starts [=<addrs|names|both>] β€” prints the function starts table for Mach-O objects. Pick your vibe: addrs (the default) prints just the addresses of functions, names prints just the names of the functions (when they're available), or both prints the names right next to the addresses. 🫢
  • -g β€” print line info from debug info, if there is any.
  • --full-leading-addr β€” prints the full leading address when disassembling.
  • --indirect-symbols β€” shows the indirect symbol table.
  • --info-plist β€” shows the info plist section as strings.
  • --lazy-bind β€” shows lazy binding info.
  • --link-opt-hints β€” shows the linker optimization hints.
  • -m, --macho β€” use the Mach-O specific object file parser. Fr fr, commands and other options may behave differently when you use them with --macho.
  • --no-leading-headers β€” don't print any leading headers.
  • --no-symbolic-operands β€” don't print symbolic operands when disassembling.
  • --non-verbose β€” shows the info for Mach-O objects in non-verbose / numeric form.
  • --objc-meta-data β€” shows the Objective-C runtime meta data.
  • --private-header β€” shows only the first format-specific file header.
  • --rebase β€” shows rebasing information.
  • --rpaths β€” shows the runtime search paths for the binary.
  • --universal-headers β€” shows universal headers.
  • --weak-bind β€” shows weak binding information.

🧑 XCOFF ONLY OPTIONS AND COMMANDS 🧑

Now for the AIX girlies. Smaller section, still slaying.

  • --symbol-description β€” adds symbol description to the disassembly output.
  • --traceback-table β€” decodes the traceback table in the disassembly output. Also, heads up: this one implies --disassemble. ✨

πŸ’€ BUGS πŸ’€

Found a bug? Not me being the bearer of bad news, but you gotta report it. Please visit:

https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/
That URL in the original has a soft hyphen in it (https://…) because of line wrapping in the man page, so if you're copy-pasting, just grab the clean version above. πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

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


πŸ‘‘ AUTHOR πŸ‘‘

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


2003-2025, LLVM Project


And that's a wrap on the whole page, bestie! πŸ¦‹ This was LLVM-OBJDUMP(1), from the LLVM source, dated 2025-09-03. Go forth and dump some objects, you absolute icon. πŸ’–βœ¨

πŸ“¦ where this page comes from