[PATCH] D19040: Remove unnecessary load via GOT when accessing globals with PIE in x86_64

H.J. Lu via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 11:40:38 PDT 2016


On Thu, Apr 21, 2016 at 11:33 AM, Reid Kleckner <rnk at google.com> wrote:

> Basically, once you know you are looking at a symbol definition that will become part of an executable, the only thing that can replace it is another definition within the executable. The glibc loader does *not* appear to replace weak symbols in an executable with strong symbols from a DSO. I mistakenly thought it would work the same way the linker does, where strong symbols beat weak symbols.
>

Weak symbol rule only applies at link-time, not at run-time.


-- 
H.J.


More information about the llvm-commits mailing list