[compiler-rt] r250200 - [PGO]: Eliminate calls to __llvm_profile_register_function for Linux.

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 13:55:15 PDT 2015


Not problem for compile_rt code -- compiler generates PC relative
relocation, so there is no dynamic relocation generated by the linker.

David

On Fri, Oct 16, 2015 at 12:43 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> On 16 October 2015 at 12:20, Xinliang David Li <davidxl at google.com> wrote:
> > I don't see issues with both gold and gnu ld. Note that the start and
> > stop symbols in the runtime are hidden and libclang_profile.a is
> > statically linked into each shared library (each shared lib has its
> > own copy).
>
> Ah, now I see that the declaration is hidden.
>
> Note that gold and lld do the right thing, but bfd does not:
>
> Given
>         .section bar, "a"
>         .hidden __start_bar
>         .quad __start_bar
>
> Both gold and lld produce a R_X86_64_RELATIVE, bfd produces a R_X86_64_64.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151016/d2c490af/attachment.html>


More information about the llvm-commits mailing list