Thanks for your reply.<div><br></div><div>May I know which is the recommended library that should be linked against?</div><div><br></div><div>I am currently linking libprofile_rt.a.</div><div><br></div><div>And I have noticed the differences that, if we do </div>
<div><br></div><div>`nm libprofile_rt.a | grep llvm`</div><div><br></div><div>with my old copy of the llvm/clang installation, I can see</div><div><br></div><div><div>00000000000005e0 T _llvm_gcda_emit_arcs</div><div>0000000000000b48 S _llvm_gcda_emit_arcs.eh</div>
<div>0000000000000430 T _llvm_gcda_emit_function</div><div>0000000000000aa8 S _llvm_gcda_emit_function.eh</div><div>00000000000006c0 T _llvm_gcda_end_file</div><div>0000000000000b98 S _llvm_gcda_end_file.eh</div><div>00000000000003d0 T _llvm_gcda_increment_indirect_counter</div>
<div>0000000000000a80 S _llvm_gcda_increment_indirect_counter.eh</div><div>0000000000000000 T _llvm_gcda_start_file</div><div>0000000000000a08 S _llvm_gcda_start_file.eh</div><div><br></div><div>They are the symbols that my test build is looking for.</div>
<div><br></div><div>But with the latest codebase, here is what I saw</div><div><br></div><div><div>00000000000000a8 T llvm_start_basic_block_tracing</div><div>0000000000000067 T llvm_trace_basic_block</div><div>0000000000000467 T llvm_decrement_path_count</div>
<div>000000000000042a T llvm_increment_path_count</div><div>0000000000000662 T llvm_start_path_profiling</div><div>0000000000000020 T llvm_start_edge_profiling</div><div>0000000000000020 T llvm_start_opt_edge_profiling</div>
</div><div><br></div><div>Thanks again,</div><div>Qun</div><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 1:11 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Qun Fa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I am trying to test my project and get the code coverage with a version<br>
of clang compiler that was built from the latest llvm/clang codebase.<br>
<br>
It worked for a while. But today, after I updated my local checkout, and<br>
re-build llvm, clang and compiler-rt, when I test my project again, I<br>
got the errors with undefined reference to 'llvm_gcda_start_file',<br>
'llvm_gcda_emit_arcs', 'llvm_gcda_emit_function', and 'llvm_gcda_end_file'.<br>
<br>
I have searched the codebase, and have found the functions are defined<br>
in GCDAProfiling.c file, but not sure why this suddenly doesn't work for me.<br>
<br>
Anyone can give any suggestions?<br>
</blockquote>
<br></div></div>
Those symbols should be provided by compiler-rt/lib/profile/<u></u>GCDAProfiling.c. There used to be a copy in llvm's tree, but I deleted that one recently. It's possible you used to be using the one from llvm, but now need to switch to using the one from compiler-rt?<span class="HOEnZb"><font color="#888888"><br>

<br>
Nick<br>
<br>
</font></span></blockquote></div><br></div>