[PATCH] D20217: Add direct control of whether or not a symbol is preemtable at runtime

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 20:10:08 PDT 2017


Sean Fertile via Phabricator <reviews at reviews.llvm.org> writes:

> sfertile added a comment.
>
> @rafael Hi Rafael, I'm interested in picking this work up. I have rebased your patch to top of trunk and made the changes suggested in the review comments (absolute flag, prepend 'dso_' to the new keywords). I have a question though,
>
> In https://reviews.llvm.org/D20217#430433, @mehdi_amini wrote:
>
>> Can you confirm that this attribute would apply to declaration as well? So that we would generate direct accesses and not go through the GOT/PLT? Even for symbol defined in different module from their uses?
>
>
> Is this the intention? This is my motivation for picking this up.

Yes, that is the intention. That is why the function is called
should*Assume*DSOLocal.

The idea is that if the assumption is wrong the linker will produce an
error or use some hack (copy relocation, magic plt entry) to handle it.

Thanks a lot for looking at this!

Cheers,
Rafael


More information about the llvm-commits mailing list