LLVM-OBJDUMP(1)
π LLVM-OBJDUMP(1) π
okay bestie, welcome to the llvm-objdump manual page β it lives in section 1 of the LLVM manual, and it's literally the object-file dumper. let's get into it β¨
πΈ NAME πΈ
llvm-objdump β LLVM's object file dumper. that's it, that's the whole name, she's simple and she's iconic π
π¦ SYNOPSIS π¦
llvm-objdump [commands] [options] [filenames...]
β¨ DESCRIPTION β¨
so the llvm-objdump utility prints the contents of object files and final linked images named on the command line. she's nosy in the best way π«Ά
- if no file name is specified,
llvm-objdumpwill attempt to read froma.out. (yes, she'll just go looking, don't be weird about it) - if
-is used as a file name,llvm-objdumpwill process a file on its standard input stream. very demure, very stdin π
π COMMANDS π
at least one of the following commands are required, and some commands can be combined with other commands. so like, you can't just show up with nothing, she needs a lil direction okay π
-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. she's doing the MOST and honestly? slay π
π 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--mattr=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.--prefix=<prefix>β when disassembling with the--sourceoption, prepend prefix to absolute paths.--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.
--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.
- only works with an X86 linked image. (yes, only X86, don't try it elsewhere bestie)
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>
--triple=<string>β target triple to disassemble for, see--versionfor available targets.-w,--wideβ ignored for compatibility with GNU objdump. (she's just there for the vibes, she does nothing)--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/>. (not me being the bug reporter π )
π«Ά SEE ALSO π«Ά
llvm-nm(1), llvm-readelf(1), llvm-readobj(1)
β AUTHOR β
maintained by the LLVM Team (https://llvm.org/).
πΈ COPYRIGHT πΈ
2003-2024, LLVM Project
okay that's the whole page bestie, ily, go dump some objects πβ¨ and real quick, the cute lil sign-off at the bottom of the original said this was LLVM, release 12, dated 2024-07-18 β so that's your version and your date, mwah ππ¦
π¦ where this page comes from
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms