Hi, On Mon, 11 May 2015, H.J. Lu wrote:
> To remove one direct branch to PLT for external function calls: > > https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00001.html > > I am proposing to add 2 new relocations, R_X86_64_RELAX_PC32 > and R_X86_64_RELAX_PLT32: > > 1. They can only be used on 32-bit PC relative call/jmp instructions. > 2. call/jmp instructions must have a 0x48 prefix. > 3. Linker can treat them as R_X86_64_PC32 and R_X86_64_PLT32, > respectively. > 4. Optionally, linker can convert > > 0x48 call/jmp foo[@PLT] > > to > > call/jmp *foo@GOTPCREL(%rip) Perhaps it should be clarified that the intention here is, that the respective GOT slot will be relocated with the PLT slot address+6, not with the final address of symbol foo (that will be done when actually jumping/calling through that got slot); at least when RELAX_PLT32 is used. Ciao, Michael.