LLVM-OBJDUMP(1)
πΈ NAME πΈ
okay bestie, meet llvm-objdump β manual page LLVM-OBJDUMP(1) from the LLVM fam. She is literally LLVM's object file dumper, and yes that is the whole name. iconic. π«Ά
β¨ 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. stdin girlie behavior, we love.
π COMMANDS π
At least one of these commands is required, and some commands can be combined with other commands. Pick your fighter(s).
-a,--archive-headersβ Display the information contained within an archive's headers. Archive header tea, served.-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>. not the jumpscare π-D,--disassemble-allβ Disassemble all sections found in the input files.--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. one-job icon behavior.-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 forCOFFandMach-Oobject 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. the βgive me everythingβ combo meal π
π OPTIONS π
llvm-objdump supports the following options:
--adjust-vma=<offset>β Increase the displayed address in disassembly or section header printing by the specifiedoffset.--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 iflibcurlwas 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 specifiedaddress. 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 specifiedaddress. 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 abb-address-mapsection is present (i.e., the object file is built with-fbasic-block-sections=labels), labels are retrieved from that section instead. If apgo-analysis-mapis present alongside thebb-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.@<FILE>β Read command-line options and commands from response file<FILE>.
π MACH-O ONLY OPTIONS AND COMMANDS π
Okay so this whole chunk? Apple girlies only. Every single one of these is Mach-O flavored, so if you're not poking at a Mach-O binary these are just gonna sit there looking pretty. π
--arch=<architecture>β tells it which architecture to disassemble, bestie. And where do you find the list of available architectures?--version, obviously. Go look. β¨--archive-member-offsetsβ prints the offset to each archive member for Mach-O archives. Heads up though: this one requires--archive-headers. No cap, it will not work solo.--bindβ shows you the binding info. π--data-in-codeβ displays the data in code table. Yes queen, the table.--dis-symname=<name>β disassembles just the instructions of the symbol you named. One (1) symbol. Nothing else. Main character energy fr.--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. That's the stuff dyld needs, and now you get to see it. π«Ά--dylibs-usedβ displays the shared libraries used for linked files.--dsym=<string>β use a.dSYMfile for debug info. Give it the string, get the debug info. π--dylib-idβ displays the shared library's ID, for dylib files specifically.--exports-trieβ displays exported symbols. The whole trie, slay. π--function-starts [=<addrs|names|both>]β prints the function starts table for Mach-O objects. You got options, babe:addrsβ print only the addresses of functions. This is the default, iykyk.namesβ print only the names of the functions (when available).bothβ print the names beside the addresses. Best of both worlds honestly. β¨
-gβ prints line information from debug info, if available. π--full-leading-addrβ prints the full leading address when disassembling. No truncation, we love a full glow-up.--indirect-symbolsβ displays the indirect symbol table.--info-plistβ displays the info plist section as strings. π--lazy-bindβ displays lazy binding info. (Lazy, but make it informational.)--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 used with--macho, so don't come for me when the output changes. It's giving "different parser, different rules". π--no-leading-headersβ does not print any leading headers. Gone. Skipped. π--no-symbolic-operandsβ does not print symbolic operands when disassembling. Just the raw stuff.--non-verboseβ displays info for Mach-O objects in non-verbose or numeric form. Numbers over nouns, honestly iconic.--objc-meta-dataβ displays the Objective-C runtime meta data. π--private-headerβ displays only the first format specific file header. Just the one. First only. That's it.--rebaseβ displays rebasing information.--rpathsβ displays runtime search paths for the binary. π§--universal-headersβ displays universal headers. Universal! Fancy!--weak-bindβ displays weak binding information. Weak bind, strong opinions. π
πΈ XCOFF ONLY OPTIONS AND COMMANDS πΈ
Tiny section, huge vibes β two options, that's the whole roster:
--symbol-descriptionβ adds the symbol description to the disassembly output. Nice little extra detail, we love context. π--traceback-tableβ decodes the traceback table in the disassembly output. And guess what? It implies--disassemble. You don't even have to ask, it's already doing it. π¦
π BUGS π
Found a bug? First of all, thank you for your service. π«‘ To report bugs, please visit https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/.
Go on, click it, the LLVM girlies genuinely want to know. π₯Ί
π SEE ALSO π
Your reading list, bestie β go be nosy:
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). Absolute legends, no notes. π
π COPYRIGHT π
2003-2025, LLVM Project
And that's a wrap on the whole page, babe! π This lil doc is from the llvm-objdump source, dated 2025-01-17, and it's page 19 of the manual, in case you were wondering. Now go disassemble something gorgeous and think of me. π
β¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms