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

Sriraman Tallam via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 16:15:18 PDT 2016


On Thu, Apr 14, 2016 at 4:07 PM, H.J. Lu <hjl.tools at gmail.com> wrote:
> On Thu, Apr 14, 2016 at 4:05 PM, Sriraman Tallam <tmsriram at google.com> wrote:
>> On Thu, Apr 14, 2016 at 3:59 PM, H.J Lu <hjl.tools at gmail.com> wrote:
>>> hjl.tools added a subscriber: hjl.tools.
>>> hjl.tools added a comment.
>>>
>>> Does it fix
>>>
>>> https://llvm.org/bugs/show_bug.cgi?id=24964
>>
>> Yes it does.  Infact, I used an identical example to motivate this
>> patch. I will reference this bug.
>>
>
> Here is another related one if  you are interested:
>
> https://llvm.org/bugs/show_bug.cgi?id=24970

Thanks.  LLVM need not generate the @PLT but the linker knows how to
remove that so this is not an issue IMO.

Also LLVM disregards symbol interposition for function symbols.  If
you use -O2, it will inline the function.  This is an inconsistency
but Reid says LLVM disallows functions to be interposed and it is not
going to be fixed.

>
>
> --
> H.J.


More information about the llvm-commits mailing list