diff options
author | Kevin Enderby <enderby@apple.com> | 2014-09-24 23:08:22 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2014-09-24 23:08:22 +0000 |
commit | bf246f5a9d7e3494a2e7f291365e63ba0a579718 (patch) | |
tree | 95e59cff6697206240c3d0e7697179c8c6851b34 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | f502d72d4e55ddff4ae2467cccb14da1136cfc83 (diff) | |
download | bcm5719-llvm-bf246f5a9d7e3494a2e7f291365e63ba0a579718.tar.gz bcm5719-llvm-bf246f5a9d7e3494a2e7f291365e63ba0a579718.zip |
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:
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
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 12cf1f72b09..4c753da7bf4 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -128,9 +128,10 @@ llvm::MAttrs("mattr", cl::desc("Target specific attributes"), cl::value_desc("a1,+a2,-a3,...")); -static cl::opt<bool> -NoShowRawInsn("no-show-raw-insn", cl::desc("When disassembling instructions, " - "do not print the instruction bytes.")); +cl::opt<bool> +llvm::NoShowRawInsn("no-show-raw-insn", cl::desc("When disassembling " + "instructions, do not print " + "the instruction bytes.")); static cl::opt<bool> UnwindInfo("unwind-info", cl::desc("Display unwind information")); |