From 85dcf4ad233decd1425115d86647348e187c0384 Mon Sep 17 00:00:00 2001 From: Michael Trent Date: Wed, 8 Aug 2018 14:39:22 +0000 Subject: [PATCH] Add a CommandGuide for llvm-objdump Summary: Add a CommandGuide for llvm-objdump summarizing its usage along with some general context. Reviewers: beanz Reviewed By: beanz Subscribers: Eugene.Zelenko, llvm-commits Differential Revision: https://reviews.llvm.org/D50034 llvm-svn: 339250 --- docs/CommandGuide/index.rst | 1 + docs/CommandGuide/llvm-objdump.rst | 115 +++++++++++++++++++++++++++++ docs/conf.py | 3 + 3 files changed, 119 insertions(+) create mode 100644 docs/CommandGuide/llvm-objdump.rst diff --git a/docs/CommandGuide/index.rst b/docs/CommandGuide/index.rst index 95efffdb656..fca5a42608c 100644 --- a/docs/CommandGuide/index.rst +++ b/docs/CommandGuide/index.rst @@ -23,6 +23,7 @@ Basic Commands llvm-ar llvm-lib llvm-nm + llvm-objdump llvm-config llvm-diff llvm-cov diff --git a/docs/CommandGuide/llvm-objdump.rst b/docs/CommandGuide/llvm-objdump.rst new file mode 100644 index 00000000000..0d029152047 --- /dev/null +++ b/docs/CommandGuide/llvm-objdump.rst @@ -0,0 +1,115 @@ +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:: -disassemble + + Display assembler mnemonics for the machine instructions + +.. option:: -help + + Display usage information and exit. Does not stack with other commands. + +.. option:: -r + + Display the relocation entries in the file. + +.. option:: -s + + Display the content of each section. + +.. option:: -section-headers + + Display summaries of the headers for each section. + +.. option:: -t + + Display the symbol table. + +.. option:: -version + + Display the version of this program. Does not stack with other commands. + +OPTIONS +------- +:program:`llvm-objdump` supports the following options: + +.. option:: -arch= + + Specify the architecture to disassemble. see -version for available + architectures. + +.. option:: -cfg + + Create a CFG for every symbol in the object file and write it to a graphviz + file (Mach-O-only). + +.. option:: -dsym= + + Use .dSYM file for debug info. + +.. option:: -g + + Print line information from debug info if available. + +.. 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:: -stats + + Enable statistics output from program. + +.. option:: -triple= + + Target triple to disassemble for, see -version for available targets. + +.. option:: -x86-asm-syntax=