From bf246f5a9d7e3494a2e7f291365e63ba0a579718 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Wed, 24 Sep 2014 23:08:22 +0000 Subject: Flush out enough of llvm-objdump’s SymbolizerSymbolLookUp() for Mach-O files to get the literal string “Hello world” printed as a comment on the instruction that loads the pointer to it. For now this is just for x86_64. So for object files with relocation entries it produces things like: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leaq L_.str(%rip), %rax ## literal pool for: "Hello world\n" and similar for fully linked images like executables: leaq 0x4f(%rip), %rax ## literal pool for: "Hello world\n" Also to allow testing against darwin’s otool(1), I hooked up the existing -no-show-raw-insn option to the Mach-O parser code, added the new Mach-O only -full-leading-addr option to match otool(1)'s printing of addresses and also added the new -print-imm-hex option. llvm-svn: 218423 --- llvm/tools/llvm-objdump/llvm-objdump.h | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/tools/llvm-objdump/llvm-objdump.h') diff --git a/llvm/tools/llvm-objdump/llvm-objdump.h b/llvm/tools/llvm-objdump/llvm-objdump.h index cae10354a91..5ecbb12c6b1 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.h +++ b/llvm/tools/llvm-objdump/llvm-objdump.h @@ -27,6 +27,7 @@ extern cl::opt TripleName; extern cl::opt ArchName; extern cl::opt MCPU; extern cl::list MAttrs; +extern cl::opt NoShowRawInsn; // Various helper functions. bool error(std::error_code ec); -- cgit v1.2.3