summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
diff options
context:
space:
mode:
authorMarcos Pividori <mpividori@google.com>2017-02-01 17:59:23 +0000
committerMarcos Pividori <mpividori@google.com>2017-02-01 17:59:23 +0000
commit460886e3cf73c119e4773df1f141e5e5d3925fba (patch)
treea1fae80ec342dda7138abb5fc089389439f83f34 /llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
parent7a3a390afbbc84935a4a39fa60eff8e922e0e9f1 (diff)
downloadbcm5719-llvm-460886e3cf73c119e4773df1f141e5e5d3925fba.tar.gz
bcm5719-llvm-460886e3cf73c119e4773df1f141e5e5d3925fba.zip
[libFuzzer] Do not use llvm-objdump for disassembling a DSO.
When disassembling a DSO, for calls to functions from the PLT, llvm-objdump only prints the offset from the PLT, like: <.plt+0x30>. While objdump and dumpbin print the function name, like: <__sanitizer_cov_trace_pc_guard@plt> When analyzing the coverage in libFuzzer we dissasemble and look for the calls to __sanitizer_cov_trace_pc_guard. So, this fails when using llvm-objdump on a DSO. Differential Revision: https://reviews.llvm.org/D29372 llvm-svn: 293791
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerUtilWindows.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerUtilWindows.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp b/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
index 34a17cf305b..7fd09e0ed1b 100644
--- a/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
+++ b/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
@@ -181,10 +181,7 @@ const void *SearchMemory(const void *Data, size_t DataLen, const void *Patt,
std::string DisassembleCmd(const std::string &FileName) {
if (ExecuteCommand("dumpbin /summary > nul") == 0)
return "dumpbin /disasm " + FileName;
- if (ExecuteCommand("llvm-objdump > nul") == 0)
- return "llvm-objdump -d " + FileName;
- Printf("libFuzzer: couldn't find tool to disassemble (dumpbin, "
- "llvm-objdump)\n");
+ Printf("libFuzzer: couldn't find tool to disassemble (dumpbin)\n");
exit(1);
}
OpenPOWER on IntegriCloud