bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/22791] PLT32 should be used for 32-bit PC-relative branches


From: hjl.tools at gmail dot com
Subject: [Bug gas/22791] PLT32 should be used for 32-bit PC-relative branches
Date: Wed, 07 Feb 2018 22:11:36 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22791

--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Rafael Ávila de Espíndola from comment #16)
> > > If your argument is that you can always treat PC32 relocations on branches
> > > as if they were PLT32 relocations, why not just have the compiler emit 
> > > PLT32
> > > relocations in the first place?
> > 
> > Yes, this patch does that:
> > 
> > https://sourceware.org/ml/binutils/2018-02/msg00074.html
> 
> If I understand it correctly, the idea is to generate a R_X86_64_PLT32 for
> "call foo" but a R_86_64_PC32 for ".long foo - .". If that is indeed what
> the patch is doing, I love it :-)

Yes, that is what patch does.  My current patch is at

https://github.com/hjl-tools/binutils-gdb/commit/80de23823c97db558436c9ad13d6728f43329706

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]