This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [parisc-linux] binutils 2.15?
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: carlos at baldric dot uwo dot ca (Carlos O'Donell)
- Cc: amodra at bigpond dot net dot au, jakub at redhat dot com, parisc-linux at parisc-linux dot org, binutils at sources dot redhat dot com
- Date: Sun, 27 Jun 2004 23:25:28 -0400 (EDT)
- Subject: Re: [parisc-linux] binutils 2.15?
> > There's a lazy linking stub inserted at the end of the .plt section that
> > loads the .got address by
> >
> > b,l 1b,%r20
> > depi 0,31,2,%r20
> >
> > ie. it depends on .got immediately following these instructions.
>
> My apologies for a tardy reply.
>
> We don't *have* to depend on the .got immediately following these
> instructions. Technically we look for a signature at the end of the PLT.
> The code in glibc looks beyond the last relocation in the following
> equation:
>
> ptr = reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB
>
> And if it finds the signature at ptr[-2] and ptr[-1], then it
> acknowledges that as the PLT stub. It then by proxy knows that the GOT
> should be at ptr[0], but it doesn't have to rely strictly on this, I'm
> more than willing to add more code to glibc to remove this restriction.
>From my perspective, we need binutils to work with existing versions
of glibc. While Carlos' offer to work on removing the restriction is
commendable, the details of this haven't been worked out or tested.
I believe that we need GOT after PLT until the glibc changes are
available and widely distributed.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)