Index: docs/CommandGuide/index.rst =================================================================== --- docs/CommandGuide/index.rst +++ docs/CommandGuide/index.rst @@ -26,6 +26,7 @@ llvm-config llvm-diff llvm-cov + llvm-objdump llvm-profdata llvm-stress llvm-symbolizer Index: docs/CommandGuide/llvm-objdump.rst =================================================================== --- /dev/null +++ docs/CommandGuide/llvm-objdump.rst @@ -0,0 +1,276 @@ +llvm-objdump - LLVM's object file dumper +======================================== + +SYNOPSIS +-------- + +:program:`llvm-objdump` [*commands*] [*options*] [*filenames...*] + +DESCRIPTION +----------- +The :program:`llvm-objdump` utility prints the contents of object files and +final linked images named on the command line. If no file name is specified, +:program:`llvm-objdump` will attempt to read from *a.out*. If *-* is used as a +file name, :program:`llvm-objdump` will process a file on its standard input +stream. + +COMMANDS +-------- +At least one of the following commands are required, and some commands can be +combined with other commands: + +.. option:: -archive-headers + + Print archive headers for Mach-O archives (requires ``-macho``). + +.. option:: -bind + + Display mach-o binding info. + +.. option:: -data-in-code + + Print the data in code table for Mach-O objects (requires ``-macho``). + +.. option:: -disassemble + + Display assembler mnemonics for the machine instructions. + +.. option:: -dwarf= + + Dump of dwarf debug sections: + + .. option:: frames + + .debug_frame + +.. option:: -dylib-id + + Print the shared library's id for the dylib Mach-O file (requires ``-macho``). + +.. option:: -dylibs-used + + Print the shared libraries used for linked Mach-O files (requires ``-macho``). + +.. option:: -exports-trie + + Display mach-o exported symbols. + +.. option:: -fault-map-section + + Display contents of faultmap section. + +.. option:: -help + + Display usage information and exit. Does not stack with other commands. + +.. option:: -indirect-symbols + + Print indirect symbol table for Mach-O objects (requires ``-macho``). + +.. option:: -info-plist + + Print the info plist section as strings for Mach-O objects (requires + ``-macho``). + +.. option:: -lazy-bind + + Display mach-o lazy binding info. + +.. option:: -link-opt-hints + + Print the linker optimization hints for Mach-O objects (requires ``-macho``). + +.. option:: -objc-meta-data + + Print the Objective-C runtime meta data for Mach-O files (requires + ``-macho``). + +.. option:: -private-header + + Display only the first format specific file header. + +.. option:: -private-headers + + Display format specific file headers. + +.. option:: -r + + Display the relocation entries in the file. + +.. option:: -raw-clang-ast + + Dump the raw binary contents of the clang AST section. + +.. option:: -rebase + + Display mach-o rebasing info. + +.. option:: -s + + Display the content of each section. + +.. option:: -section= + + Operate on the specified sections only. With ``-macho`` dump segment,section. + +.. option:: -section-headers + + Display summaries of the headers for each section. + +.. option:: -t + + Display the symbol table. + +.. option:: -universal-headers + + Print Mach-O universal headers (requires ``-macho``). + +.. option:: -unwind-info + + Display unwind information. + +.. option:: -version + + Display the version of this program. Does not stack with other commands. + +.. option:: -weak-bind + + Display mach-o weak binding info. + +OPTIONS +------- +:program:`llvm-objdump` supports the following options: + +.. option:: -aarch64-neon-syntax + + Choose style of NEON code to emit from AArch64 backend: + + .. option:: generic + + Emit generic NEON assembly. + + .. option:: apple + + Emit Apple-style NEON assembly. + +.. option:: -arch= + + Specify the architecture to disassemble. see ``-version`` for available + architectures. + +.. option:: -arch-name= + + Target arch to disassemble for, see ``-version`` for available targets. + +.. option:: -archive-member-offsets + + Print the offset to each archive member for Mach-O archives (requires + ``-macho`` and ``-archive-headers``). + +.. option:: -color + + Use colored syntax highlighting (default=autodetect). + +.. option:: -dis-symname= + + Disassemble just this symbol's instructions (requires ``-macho``). + +.. option:: -dsym= + + Use .dSYM file for debug info. + +.. option:: -full-leading-addr + + Print full leading address. + +.. option:: -g + + Print line information from debug info if available. + +.. option:: -line-numbers + + Display source line numbers with disassembly. Implies disassemble object. + +.. option:: -macho + + Use Mach-O specific object file parser. + +.. option:: -mattr= + + Target specific attributes. + +.. option:: -mc-x86-disable-arith-relaxation + + Disable relaxation of arithmetic instruction for X86. + +.. option:: -mcpu= + + Target a specific cpu type (-mcpu=help for details) + +.. option:: -no-leading-addr + + Print no leading address. + +.. option:: -no-leading-headers + + Print no leading headers. + +.. option:: -no-show-raw-insn + + When disassembling instructions, do not print the instruction bytes. + +.. option:: -no-symbolic-operands + + Do not symbolic operands when disassembling (requires ``-macho``). + +.. option:: -non-verbose + + Print the info for Mach-O objects in non-verbose or numeric form (requires + ``-macho``). + +.. option:: -print-imm-hex + + Use hex format for immediate values. + +.. option:: -print-module-scope + + When printing IR for ``print-[before|after]{-all}`` always print a module IR. + +.. option:: -start-address=
+ + Disassemble beginning at address. + +.. option:: -stats + + Enable statistics output from program. + +.. option:: -stop-address=
+ + Stop disassembly at address. + +.. option:: -triple= + + Target triple to disassemble for, see ``-version`` for available targets. + +.. option:: -x86-asm-syntax=