LLVM-OBJDUMP(1)
π llvm-objdump β bestie's guide to peeking inside object files π
okay so. you know how your compiled binaries are like little mystery boxes and you're just sitting there like "what is IN there"? yeah. llvm-objdump is the LLVM utility that prints the contents of object files and final linked images named on the command line. it's giving x-ray vision, fr fr. π₯
no cap, if you don't name any file, llvm-objdump will attempt to read from a.out. and if you use - as a file name, it will process a file on its standard input stream. iconic behaviour honestly. β¨
πΈ SYNOPSIS πΈ
llvm-objdump [commands] [options] [filenames...]
β¨ COMMANDS β¨
okay bestie listen. you need at least one of the following commands, and some of them can be combined with other commands. mix and match, slay. π
-a,--archive-headersβ display the information contained within an archive's headers.-d,--disassembleβ disassemble all text sections found in the input files.-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. π«-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).--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 whole buffet, periodt. π
π 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--versionfor a list of available targets.-C,--demangleβ demangle symbol names in the output.--debug-vars=<format>β print the locations (in registers or memory) of source-level variables alongside disassembly. format may beunicodeorascii, defaulting tounicodeif omitted.--debug-vars-indent=<width>β distance to indent the source-level variable display, relative to the start of the disassembly. defaults to40characters.-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. currently supported for ARM targets only. available options arereg-names-stdandreg-names-raw.--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--mcpu=helpto display the available attributes.--no-leading-addrβ when disassembling, do not print leading addresses.--no-show-raw-insnβ when disassembling, do not print the raw bytes of each instruction.--print-imm-hexβ use hex format when printing immediate values in disassembly output.-S,--sourceβ when disassembling, display source interleaved with the disassembly. implies--disassemble.--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.
--triple=<string>β target triple to disassemble for, see--versionfor available targets.-w,--wideβ ignored for compatibility with GNU objdump. it's just there being decorative bestie, no cap. π--x86-asm-syntax=<style>β 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 π¦
--arch=<architecture>β specify the architecture to disassemble. see--versionfor available architectures.--archive-member-offsetsβ print the offset to each archive member for Mach-O archives (requires--archive-headers).--bindβ display binding info--cfgβ create a CFG for every symbol in the object file and write it to a graphviz file.--data-in-codeβ display the data in code table.--dis-symname=<name>β disassemble just the specified symbol's instructions.--dylibs-usedβ display the shared libraries used for linked files.--dsym=<string>β use.dSYMfile for debug info.--dylib-idβ display the shared library's ID for dylib files.--exports-trieβ display exported symbols.-gβ print line information from debug info if available.--full-leading-addrβ print the full leading address when disassembling.--indirect-symbolsβ display the indirect symbol table.--info-plistβ display the info plist section as strings.--lazy-bindβ display lazy binding info.--link-opt-hintsβ display the linker optimization hints.-m,--machoβ use Mach-O specific object file parser. commands and other options may behave differently when used with--macho.--no-leading-headersβ do not print any leading headers.--no-symbolic-operandsβ do not print symbolic operands when disassembling.--non-verboseβ display the information for Mach-O objects in non-verbose or numeric form.--objc-meta-dataβ display the Objective-C runtime meta data.--private-headerβ display only the first format specific file header.--rebaseβ display rebasing information.--universal-headersβ display universal headers.--weak-bindβ display weak binding information.
π XCOFF ONLY OPTIONS AND COMMANDS π
--symbol-descriptionβ add symbol description to disassembly output.
π BUGS π
to report bugs, please visit <https://bugs.llvm.org/>. (yes it's a link, go click it, they want your bug reports bestie.)
π SEE ALSO π
llvm-nm(1), llvm-readelf(1), llvm-readobj(1)
the whole friend group honestly. π«Ά
π§ AUTHOR π§
maintained by the LLVM Team (https://llvm.org/).
π COPYRIGHT π
2003-2024, LLVM Project
and that's the whole page bestie, no cap. this is LLVM's own llvm-objdump(1) manual, dated 2024-07-18 and tagged LLVM at version 11 in the footer β go dump some objects and be the main character of your own disassembly. periodt. π
β¨π
π¦ where this page comes from
- fedora 43: llvm11 11.1.0-14.fc41 Β· NCSA
- fedora 43: llvm11 11.1.0-14.fc41 Β· NCSA
- fedora 44: llvm11 11.1.0-14.fc41 Β· NCSA
- fedora 44: llvm11 11.1.0-14.fc41 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms