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,--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. No picking favorites. π--disassemble-symbols=<symbol1[,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. 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--versionfor 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-idsubdirectory 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 variableDEBUGINFOD_URLS. π--debug-vars=<format>β print the locations (in registers or memory) of source-level variables alongside disassembly.formatmay beunicodeorascii, defaulting tounicodeif omitted. π¬--debug-vars-indent=<width>β distance to indent the source-level variable display, relative to the start of the disassembly. Defaults to52characters. π-j,--section=<section1[,section2,...]>β perform commands on the specified sections only. For Mach-O usesegment,sectionto 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, withr13/r14/r15replaced bysp/lr/pc.reg-names-raw: ARM only. Userfollowed 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. printx1instead ofra)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=helpto display available CPUs. π§--mattr=<a1,+a2,-a3,...>β enable/disable target-specific attributes. Specify--mattr=helpto 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--sourceoption, prependprefixto absolute paths. π§©--prefix-strip=<level>β when disassembling with the--sourceoption, strip outlevelinitial 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 leastaddress. When printing symbols, only print symbols with a value of at leastaddress. π--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 toaddress. When printing symbols, only print symbols with a value up toaddress. π--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-operandswithbb-address-mapandpgo-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-operandsis enabled. π--triple=<string>β target triple to disassemble for, see--versionfor 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 assemblyintelβ 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.dSYMfile 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,namesprints just the names of the functions (when they're available), orbothprints 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.
π COPYRIGHT π
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
- fedora 43: llvm20 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 43: llvm20 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms