[PATCH] D18403: Access protected symbols via GOT, even in non-PIC mode
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 23 09:54:23 PDT 2016
joerg created this revision.
joerg added reviewers: hjl.tools, rafael, nadav.
joerg added a subscriber: llvm-commits.
joerg set the repository for this revision to rL LLVM.
Access to protected symbols is special as they can be interposed. Compare https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 for the history.
This patch introduces a new predicate on Global Value to decide whether a symbol can be interposed. Hidden and local symbols can never be interposed. Protected symbols are safe as well, if they are actually defined. Common linkage counts as definition here. The rest of the patch teaches the X86 target about using PIC access for interposable protected symbols, even when not doing PIC normally. This is required to avoid copy relocations, which would change the address and are rejected by newer binutils versions.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7464 bytes
Desc: not available
More information about the llvm-commits