This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils is broken on ELF/mips (Re: binutils is broken on Linux/alpha)
- To: binutils at sourceware dot cygnus dot com
- Subject: Re: binutils is broken on ELF/mips (Re: binutils is broken on Linux/alpha)
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Wed, 3 Oct 2001 15:12:38 -0700
- Cc: amodra at bigpond dot net dot au
- References: <20010929103515.A30321@lucon.org> <20010929113438.A31207@lucon.org> <20010929175026.A4038@lucon.org> <20011003150159.A28550@lucon.org>
On Wed, Oct 03, 2001 at 03:01:59PM -0700, H . J . Lu wrote:
> On Sat, Sep 29, 2001 at 05:50:26PM -0700, H . J . Lu wrote:
> > On Sat, Sep 29, 2001 at 11:34:38AM -0700, H . J . Lu wrote:
> > > On Sat, Sep 29, 2001 at 10:35:15AM -0700, H . J . Lu wrote:
> > >
> > > Hi Alan,
> > >
> > > I have verified that your patch
> > >
> > > http://sources.redhat.com/ml/binutils/2001-09/msg00487.html
> > >
> > > causes the Linux/alpha failures. There may be more broken ELF targets
> > > because of your change.
> > >
> > >
> >
> > Alan,
> >
> > This change is wrong or incomplete. You cannot do
> >
> > - if (dir->got.offset == (bfd_vma) -1)
> > + if (dir->got.refcount <= 0)
> >
> > nor
> >
> > - dir->plt.offset = ind->plt.offset;
> > - ind->plt.offset = (bfd_vma) -1;
> > + dir->plt.refcount = ind->plt.refcount;
> > + ind->plt.refcount = 0;
> >
>
> Alan, your latest patch is still not correct for all ELF targets.
> ELF/mips doesn't use refcount. However, -1 offset and 0 offset have
> special meanings. Now, with your change, ELF/mips is broken. I believe
> you need to do
>
> # grep "t\.offset" elf*.?
>
> and exam every single useage of it. Could you please fix it?
>
Ok, you don't need to exam all. Here is a subset:
# grep "t\.offset" elf32-arm.h elf32-mips.c elf32-sh.c elf32-sparc.c elf64-alpha.c elf64-sparc.c elfxx-ia64.c elf-bfd.h elf.c elflink.h
All those places may not use refcount.
H.J.