Lgtm, in the future we could add an option to llvm-objdump to print the same format, but it's not important right now <br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 31, 2017 at 9:36 PM Marcos Pividori via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mpividori created this revision.<br class="gmail_msg">
<br class="gmail_msg">
When disassembling a DSO, for calls to functions from the PLT, `llvm-objdump` only prints the offset from the PLT, like: `<.plt+0x30>`.<br class="gmail_msg">
<br class="gmail_msg">
While `objdump` and `dumpbin` print the function name, like: `<__sanitizer_cov_trace_pc_guard@plt>`<br class="gmail_msg">
<br class="gmail_msg">
When analyzing the coverage in `libFuzzer` we dissasemble and look for the calls to `__sanitizer_cov_trace_pc_guard`.<br class="gmail_msg">
<br class="gmail_msg">
So, this fails when using `llvm-objdump` on a DSO.<br class="gmail_msg">
<br class="gmail_msg">
This was the reason why `coverage.test` was failing on Windows:<br class="gmail_msg">
<br class="gmail_msg">
- `dumpbin` was not considered because of <a href="https://reviews.llvm.org/D29371" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D29371</a><br class="gmail_msg">
- `llvm-objdump` didn't find the calls to `__sanitizer_cov_trace_pc_guard` in the DLL.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D29372" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D29372</a><br class="gmail_msg">
<br class="gmail_msg">
Files:<br class="gmail_msg">
lib/Fuzzer/FuzzerUtilWindows.cpp<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Index: lib/Fuzzer/FuzzerUtilWindows.cpp<br class="gmail_msg">
===================================================================<br class="gmail_msg">
--- lib/Fuzzer/FuzzerUtilWindows.cpp<br class="gmail_msg">
+++ lib/Fuzzer/FuzzerUtilWindows.cpp<br class="gmail_msg">
@@ -181,10 +181,7 @@<br class="gmail_msg">
std::string DisassembleCmd(const std::string &FileName) {<br class="gmail_msg">
if (ExecuteCommand("dumpbin /summary > nul") == 0)<br class="gmail_msg">
return "dumpbin /disasm " + FileName;<br class="gmail_msg">
- if (ExecuteCommand("llvm-objdump > nul") == 0)<br class="gmail_msg">
- return "llvm-objdump -d " + FileName;<br class="gmail_msg">
- Printf("libFuzzer: couldn't find tool to disassemble (dumpbin, "<br class="gmail_msg">
- "llvm-objdump)\n");<br class="gmail_msg">
+ Printf("libFuzzer: couldn't find tool to disassemble (dumpbin)\n");<br class="gmail_msg">
exit(1);<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>