<div dir="ltr">Not problem for compile_rt code -- compiler generates PC relative relocation, so there is no dynamic relocation generated by the linker.<div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 16, 2015 at 12:43 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 16 October 2015 at 12:20, Xinliang David Li <<a href="mailto:davidxl@google.com">davidxl@google.com</a>> wrote:<br>
> I don't see issues with both gold and gnu ld. Note that the start and<br>
> stop symbols in the runtime are hidden and libclang_profile.a is<br>
> statically linked into each shared library (each shared lib has its<br>
> own copy).<br>
<br>
</span>Ah, now I see that the declaration is hidden.<br>
<br>
Note that gold and lld do the right thing, but bfd does not:<br>
<br>
Given<br>
        .section bar, "a"<br>
        .hidden __start_bar<br>
        .quad __start_bar<br>
<br>
Both gold and lld produce a R_X86_64_RELATIVE, bfd produces a R_X86_64_64.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>