forked from OSchip/llvm-project
[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
This commit is contained in:
parent
7a3a390afb
commit
460886e3cf
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue