[PATCH] D19995: Optimize access to global variable references in PIE mode when linker supports copy relocations for PIE
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 14:07:46 PDT 2016
On Thu, May 05, 2016 at 09:19:46PM +0000, Sriraman Tallam via llvm-commits wrote:
> For X86, in PIE mode, when accessing extern global variables, an extra
> load from the GOT can be avoided if the linker allows copy relocations
> for PIE. This patch makes it possible. This is already available in
> the GCC compiler.
OK, let's go back to original goal and look at better ways to achieve
this. Can we agree on the problem first:
(1) The main program consists of one or more compile units. It declares
non-static file-scope variables.
(2) LTO may or may not be used.
(3) The goal is to access defined variables without the penalty of the
GOT.
Do we agree on this so far?
Joerg
More information about the llvm-commits
mailing list