[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:45:59 PDT 2016


On Thu, Apr 14, 2016 at 4:44 PM, H.J. Lu <hjl.tools at gmail.com> wrote:
> On Thu, Apr 14, 2016 at 4:15 PM, Sriraman Tallam <tmsriram at google.com> wrote:
>> 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.
>>
>
> It isn't an issue for x86-64.  But setting up PLT is expensive for i386,
> which requires EBX.

You are right, sorry! I was not looking outside x86-64.

>
>
> H.J.


More information about the llvm-commits mailing list