LLVM-OBJDUMP(1)

πŸ“¦
version 11.1.0 Β· 3 versions
, in fedora 43, fedora 44

πŸ‘‘ 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 --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).
  • --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. 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 --version for 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 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 40 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. currently supported for ARM targets only. available options are reg-names-std and reg-names-raw.
  • --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 --mcpu=help to 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 --version for 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 assembly
    • intel β€” 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 --version for 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 .dSYM file 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/).


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