This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]