<div dir="ltr">I don't use the pre-built binaries, but I believe the missing symbols are part of compiler-rt. Please see: <a href="https://compiler-rt.llvm.org/">https://compiler-rt.llvm.org/</a><div><br></div><div>hth...</div><div>don</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 15, 2017 at 5:09 PM, Dipanjan Das via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div>This happens with LLVM 4.0, too. Is it a bug I am hitting, by any chance?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 14 June 2017 at 17:00, Dipanjan Das <span dir="ltr"><<a href="mailto:mail.dipanjan.das@gmail.com" target="_blank">mail.dipanjan.das@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>I am using pre-built LLVM/Clang 3.8.0 binaries on Ubuntu 16.04.2, 64 bit. I tried to lift a minimal program to LLVM IR, then link the IR to DataFlowSanitizer libraries to produce executable code. In the second step, the process throws a bunch of linker errors.<div><br></div><div>==============================<wbr>===========</div><div><br></div><div><div>#include <sanitizer/dfsan_interface.h></div><div>#include <assert.h></div><div><br></div><div>int main(void) {</div><div> int i = 1;</div><div> </div><div> dfsan_label i_label = dfsan_create_label("i", 0);</div><div> dfsan_set_label(i_label, &i, sizeof(i));</div><div><br></div><div> return 0;</div><div>}</div><div><br></div><div>==============================<wbr>===========<br></div><div><br></div><div>clang -c -emit-llvm -fsanitize=dataflow test.c -o test.bc<br></div><div><br></div><div><div>clang -fsanitize=dataflow test2.bc -o test2</div><div><br></div><div>/usr/lib/gcc/x86_64-linux-gnu/<wbr>5.4.0/../../../x86_64-linux-gn<wbr>u/Scrt1.o: In function `_start': </div><div>(.text+0x20): undefined reference to `main' </div><div>/tmp/test2-c642ef.o: In function `dfs$main': </div><div>test2.bc:(.text+0x96): undefined reference to `dfs$dfsan_create_label' </div><div>test2.bc:(.text+0xeb): undefined reference to `dfs$dfsan_set_label' </div><div>/tmp/test2-c642ef.o: In function `dfs$dfsw$dfsan_create_label': </div><div>test2.bc:(.text+0x16e): undefined reference to `dfs$dfsan_create_label' </div><div>/tmp/test2-c642ef.o: In function `dfs$dfsw$dfsan_set_label': </div><div>test2.bc:(.text+0x1e4): undefined reference to `dfs$dfsan_set_label' </div><div>clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)</div></div><div><br></div><div>==============================<wbr>===========<br></div><div><br></div><div>Any idea what might I be doing wrong?</div><span class="m_914138946040282974HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_914138946040282974m_-1536513879465304325gmail_signature"><div dir="ltr"><span><div><div dir="ltr"><p>Thanks & Regards,</p>
<div>Dipanjan</div></div></div></span></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_914138946040282974gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span><div><div dir="ltr"><p>Thanks & Regards,</p>
<div>Dipanjan</div></div></div></span></div></div>
</div>
</div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>