[PATCH] D19995: Optimize access to global variable references in PIE mode when linker supports copy relocations for PIE

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 15:52:18 PDT 2016


On 7 May 2016 at 13:38, Xinliang David Li via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Hi Rafael, IIUC, for non-pie case, LLVM is already assuming linker supports
> copyreloc and already takes advantage of it to avoid generating references
> via GOT.  This patch just extends that for pie.  It should not change
> behavior regarding preemption, no?

Yes. The issue is that the this are is LLVM is pretty messy. We have
to clean it up. I think my proposal makes LLVM consistent about what
can and cannot be preempted and in passing makes it by default in
-fPIE mode assume that undefined symbols are local to the DSO.

Cheers,
Rafael


More information about the llvm-commits mailing list