LLVM-OBJDUMP(1)
๐ฆ llvm-objdump โ LLVM's object file dumper ๐ฆ
okay bestie, welcome to the LLVM-OBJDUMP(1) manual page โ this is the one where we dump object files and look at what's inside, and honestly it's giving main-character energy for binary inspection ๐
โจ
๐ NAME ๐
llvm-objdump โ LLVM's object file dumper
โจ 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. If no file name is specified, llvm-objdump will attempt to read from a.out. If - is used as a file name, llvm-objdump will process a file on its standard input stream. ๐ซถ
๐ COMMANDS ๐
At least one of the following commands are required, and some commands can be combined with other commands:
-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,--mcpuor--mattris needed to enable some instruction sets. Disabled instructions are displayed as<unknown>. ๐ญ-D,--disassemble-allโ disassemble all sections found in the input files. ๐ฅ--disassemble-symbols=<symbol1[,symbol2,...]>and--disassemble=symbol1 --disassemble=symbol2 ...โ disassemble only the specified symbols. Takes demangled symbol names when--demangleis 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 thellvm-objdumpexecutable. 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. ๐
โจ OPTIONS โจ
llvm-objdump ships with the whole buffet of options, bestie. Here's the full menu, nothing skipped, not one crumb:
--adjust-vma=<offset>โ bumps the address shown in disassembly (or in section header printing) up by offset. Basically "shift everything, I said so." ๐ซ--arch-name=<string>โ tells it which target architecture to disassemble for. Wanna know what's on the list? Run--version, it'll tell you. ๐ฏ--build-id=<string>โ finds the object using the build ID you give it, as a hex string. Whatever object it finds gets treated exactly like it was an input filename. Iconic lookup behavior fr.-C,--demangleโ demangles symbol names in the output. No more mangled gobbledygook, we're getting readable names. ๐--debug-file-directory <path>โ hands over a path to a directory containing a.build-idsubdirectory, which it'll search for debug info for stripped binaries. You can pass this more than once, and they get searched in the order you gave 'em.--debug-indent=<width>โ how far to indent the source-level variable / inlined function display, measured from the start of the disassembly. Defaults to52characters. Yes, a very specific number, and yes it's the default. ๐--debug-inlined-funcs[=<format>]โ prints where inlined functions live, right there alongside the disassembly. format can beascii,limits-only, orunicode, and it defaults tounicodeif you just leave it blank. ๐ฆ--debug-vars[=<format>]โ prints the locations (registers or memory, no cap) of source-level variables alongside the disassembly. format isasciiorunicode, defaulting tounicodewhen omitted. ๐ธ--debuginfod,--no-debuginfodโ toggles whether it tries debuginfod lookups for debug binaries. Heads up though: unless you say otherwise, debuginfod is only enabled if libcurl was compiled in (LLVM_ENABLE_CURL) and at least one server URL came from the environment variableDEBUGINFOD_URLS. Both conditions, no shortcuts. โญ-j,--section=<section1[,section2,...]>โ only runs commands on the sections you name, and nothing else. For Mach-O, write it assegment,sectionto specify the section name. ๐ซถ-l,--line-numbersโ while disassembling, shows source line numbers. Also implies--disassemble, so it comes with a friend. ๐-M,--disassembler-options=<opt1[,opt2,...]>โ passes target-specific disassembler options through. Here's what's available:reg-names-std: ARM only, and it's the default. Prints using ARM's instruction set documentation, withr13/r14/r15swapped out forsp/lr/pc.reg-names-raw: ARM only. Usesrfollowed 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 the ABI mnemonic โ like printingx1instead ofra.att: x86 only, and it's the default. Prints in the AT&T syntax.intel: x86 only. Prints in the intel syntax.
--disassembler-color=<mode>โ turns disassembler color output on or off. Your choices:off: disassembler color output off. simple as that.on: disassembler color output on. slay.terminal: on only if the terminal supports it โ and this is the default. ๐
--mcpu=<cpu-name>โ targets a specific CPU type for disassembly. Wanna see the list?--mcpu=helpwill dump the available CPUs for you. ๐--mattr=<a1,+a2,-a3,...>โ enables/disables target-specific attributes. Same deal:--mattr=helpshows you the available attributes.-mllvm <arg>โ passes an argument straight along to LLVM's CommandLine library. Forwarded, untouched. ๐--no-leading-addr,--no-addressesโ while disassembling, don't print the leading addresses for instructions or inline relocations. Minimalist era.--no-print-imm-hexโ don't use hex format for immediate values in the disassembly output. ngl sometimes you just want the other format.--no-show-raw-insnโ while disassembling, don't print the raw bytes of each instruction. Just the instruction, thanks. โจ--offloadingโ shows the content of the LLVM offloading sections plus HIP offload bundles. ๐--prefix=<prefix>โ when you're disassembling with the--sourceoption, this prepends prefix to absolute paths.--prefix-strip=<level>โ when disassembling with--source, strips out level initial directories from absolute paths. Warning bestie: this option does nothing without--prefix. Zero effect. ๐--source-dir <dir>โ when disassembling with--source, adds dir to the front of the source search path when it's looking up source files. For each source file,llvm-objdumptries the path from the debug info first, then each search directory with the full path appended, then each search directory with only the file name. You can hand it this option multiple times; every--source-diradds one directory. Options on the command line are searched in first-to-last order. ๐--substitute-path <from> <to>โ when disassembling with--source, replaces from with to at the start of the directory part of source file paths while looking up sources. A rule only gets applied if from ends at a directory separator in the path. This can be specified multiple times; rules are evaluated in the order given and the first matching rule wins โ same as GDBset substitute-path. ๐ธ--print-imm-hexโ uses hex format when printing immediate values in disassembly output. It's the default, so this is the "on purpose, explicitly" version. ๐ง-S,--sourceโ while disassembling, shows source interleaved with the disassembly. Implies--disassemble. best of both worlds fr fr ๐ซถ--show-all-symbolsโ shows every symbol during disassembly, even when multiple symbols are defined at the same location. No hiding, no picking favorites. ๐--show-lmaโ displays the LMA column when dumping ELF section headers. Off by default โ unless any section has different VMA and LMAs, in which case it kicks in on its own.--start-address=<address>โ depends what you're doing, so listen up:- When disassembling: only disassemble from the specified address onward.
- When printing relocations: only print relocations patching offsets from at least address.
- When printing symbols: only print symbols with a value of at least address.
--stop-address=<address>โ the other end of the range:- When disassembling: only disassemble up to, but not including, the specified address.
- When printing relocations: only print relocations patching offsets up to address.
- When printing symbols: only print symbols with a value up to address.
--symbolize-operands,--no-symbolize-operandsโ this one's a whole moment, so buckle up:- While disassembling, it symbolizes a branch target operand so it prints a label instead of a real address.
- When printing a PC-relative global symbol reference, it prints it as an offset from the leading symbol.
- When a
bb-address-mapsection is present (i.e., the object file is built with-fbasic-block-address-map), labels are retrieved from that section instead. And if apgo-analysis-mapis present alongside thebb-address-map, any available analyses get printed after the relevant block label. By default, any analysis with a special representation (i.e.BlockFrequency,BranchProbability, etc) gets printed as raw hex values. - Only supported for AArch64, BPF, PowerPC, RISC-V, and X86. It's enabled by default for BPF โ use
--no-symbolize-operandsto turn it off. ๐ฆ
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 you're using--symbolize-operandswithbb-address-mapandpgo-analysis-map, this 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. ๐
Careful! This only works when --symbolize-operands is enabled. Otherwise it's just sitting there doing nothing.
--triple=<string>โ the target triple to disassemble for. Peep--versionfor the available targets. โญ-w,--wideโ ignored, purely for compatibility with GNU objdump. It's there, it's vibing, it does nothing. ๐--x86-asm-syntax=<style>โ deprecated, so heads up. When used with--disassemble, it chooses the style of code emitted from the X86 backend. Supported values:attโ AT&T-style assemblyintelโ Intel-style assembly
The default disassembly style is att. ๐ฅ
-z,--disassemble-zeroesโ does not skip blocks of zeroes when disassembling. Every zero gets its moment.@<FILE>โ reads command-line options and commands from the response file<FILE>. ๐
๐ MACH-O ONLY OPTIONS AND COMMANDS ๐
Okay bestie, this whole chunk is Apple-kid territory โ Mach-O is the file format macOS/iOS use, and these flags are the ones that only make sense there. Slay.
--arch=<architecture>โ tells it which architecture to disassemble. Not sure what you've got? Peek at--versionfor the list of available architectures, iykyk.--archive-member-offsetsโ prints the offset of each archive member for Mach-O archives. Heads up though: it requires--archive-headers. It won't vibe alone.--bindโ shows binding info.--data-in-codeโ prints the data in code table.--dis-symname=<name>โ disassembles just the instructions of the symbol you name. One symbol, main character energy, no entourage.--chained-fixupsโ prints chained fixup information.--dyld-infoโ prints the bind and rebase informationdylduses to resolve external references in a final linked binary.--dylibs-usedโ shows the shared libraries used for linked files.--dsym=<string>โ uses a.dSYMfile for debug info.--dylib-idโ shows the shared library's ID for dylib files.--exports-trieโ prints the exported symbols.--function-starts [=<addrs|names|both>]โ prints the function starts table for Mach-O objects. You pick:addrs(the default) prints only function addresses,namesprints only the function names (when they're available), andbothprints the names right beside the addresses. Choose your fighter ๐ซถ-gโ prints line information from debug info, if it's there.--full-leading-addrโ prints the full leading address when disassembling. No truncation, no shame.--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. Fair warning: commands and other options may behave differently when you use them with--macho. So like, don't come for me if the output looks different โ that's literally documented.--no-leading-headersโ prints no leading headers at all.--no-symbolic-operandsโ doesn't print symbolic operands when disassembling.--non-verboseโ displays info for Mach-O objects in non-verbose (numeric) form. Straight to the numbers, no small talk.--objc-meta-dataโ shows the Objective-C runtime meta data.--private-headerโ shows only the first format specific file header. That's it. That's the whole output. Minimalist queen.--rebaseโ shows rebasing information.--rpathsโ shows runtime search paths for the binary.--universal-headersโ shows universal headers.--weak-bindโ shows weak binding information.
๐ XCOFF ONLY OPTIONS AND COMMANDS ๐
Tiny section, but it ate โ XCOFF is the AIX crowd, and there are exactly two flags here:
--symbol-descriptionโ adds a symbol description to the disassembly output.--traceback-tableโ decodes the traceback table in the disassembly output. And important: it implies--disassemble, so you don't gotta say it twice ๐
๐ BUGS ๐
Found a bug? First of all, thank you for your service ๐ซถ Please report it at <https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/>. That's the spot, no cap.
๐ SEE ALSO ๐
Your other faves, all linked up:
llvm-nm(1)<llvm-nm.html>llvm-otool(1)<llvm-otool.html>llvm-readelf(1)<llvm-readelf.html>llvm-readobj(1)<llvm-readobj.html>
๐ Author ๐
Maintained by the LLVM Team (<https://llvm.org/>). They're the ones keeping this whole thing alive, bless.
๐ Copyright ๐
2003-2026, LLVM Project โ respect the legacy, periodt.
And that's the whole page, bestie!! ๐ This was page 23 of the manual, dated 2026-10-20, from the LLVM-OBJDUMP(1) source โ go forth and dump those objects, you absolute icon ๐ฆโจ
๐ฆ where this page comes from
- arch rolling: llvm 23.1.4-1 ยท Apache-2.0 WITH LLVM-exception
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms