Re: RFC: Add a new relocation to x86-64/i386 psABIs

2015-05-18 Thread H.J. Lu
On Mon, May 18, 2015 at 8:52 AM, Michael Matz wrote: > Hi, > > On Mon, 18 May 2015, H.J. Lu wrote: > >> Yes, we should convert it to >> >> nop call foo/jmp foo nop >> >> I implemented it on users/hjl/relax branch in binutils git repo. >> >> > the insn decoder. For calls as well of course, but the

Re: RFC: Add a new relocation to x86-64/i386 psABIs

2015-05-18 Thread Michael Matz
Hi, On Mon, 18 May 2015, H.J. Lu wrote: > Yes, we should convert it to > > nop call foo/jmp foo nop > > I implemented it on users/hjl/relax branch in binutils git repo. > > > the insn decoder. For calls as well of course, but there it might be > > better to have it before the call. > > > > I

Re: RFC: Add a new relocation to x86-64/i386 psABIs

2015-05-18 Thread H.J. Lu
On Mon, May 18, 2015 at 6:13 AM, Michael Matz wrote: > Hi, > > On Mon, 18 May 2015, H.J. Lu wrote: > >> To avoid indirect branch to internal functions, I am proposing to add a >> new relocation, R_X86_64_RELAX_GOTPCREL, to x86-64 psABI: >> >> 1. When branching to an external function, foo, compile

Re: RFC: Add a new relocation to x86-64/i386 psABIs

2015-05-18 Thread Michael Matz
Hi, On Mon, 18 May 2015, H.J. Lu wrote: > To avoid indirect branch to internal functions, I am proposing to add a > new relocation, R_X86_64_RELAX_GOTPCREL, to x86-64 psABI: > > 1. When branching to an external function, foo, compiler may generate > call/jmp *foo@GOTRELAX(%rip) >which