This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Relocations to use when eliding plts
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, IA32 System V Application Binary Interface <ia32-abi at googlegroups dot com>, "x86-64-abi at googlegroups dot com" <x86-64-abi at googlegroups dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 28 May 2015 18:02:27 +0200
- Subject: Re: Relocations to use when eliding plts
- Authentication-results: sourceware.org; auth=none
- References: <5566232B dot 4080904 at redhat dot com> <CAMe9rOq57A1ksRfn95GTzfc_dFzjPjEzuqswqC8Xu-M62g_Z2g at mail dot gmail dot com> <CAMe9rOpRHqvpJMDSyXk8XrNu04aytCDPnBB03B9A1iSTk=ZhPQ at mail dot gmail dot com> <5567345B dot 5020808 at redhat dot com> <CAMe9rOo_LxNYa44XB-uJGjj=GLQ99Yz8c9FtidPr82jAxbNevg at mail dot gmail dot com> <556739BC dot 9020901 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, May 28, 2015 at 08:52:28AM -0700, Richard Henderson wrote:
> On 05/28/2015 08:42 AM, H.J. Lu wrote:
> > On Thu, May 28, 2015 at 8:29 AM, Richard Henderson <rth@redhat.com> wrote:
> >> On 05/28/2015 04:27 AM, H.J. Lu wrote:
> >>> You get consecutive jmpq's because x86 PLT entry is used as the
> >>> canonical function address. If you compile main with -fno-plt -fPIE, you
> >>> get:
> >>
> >> Well, duh. If the main executable has no PLTs, they aren't used as the
> >> canonical function address. Surely you aren't proposing that as a solution?
> >>
> >
> > I was just explaining where those consecutive jmpq's came from.
> > I wasn't suggesting a solution..
>
> I did explain it. In the quite long message.
>
> No comments about the rest of it, wherein I suggest a solution that doesn't
> require the main executable to be compiled with -fno-plt in order to avoid them?
And even that wouldn't help, you'd need to compile the binaries with -fpie -fno-plt,
as -fno-plt doesn't affect normal non-PIC calls.
Jakub