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: Another MIPS multigot patch


On Sun, Feb 15, 2004 at 01:47:28PM +0000, Richard Sandiford wrote:
> Richard Sandiford <rsandifo@redhat.com> writes:
> > Daniel Jacobowitz <drow@mvista.com> writes:
> >> Considering that the relatively recent _bfd_elf_symbol_refs_local_p is
> >> not used from the MIPS code, I would have been amazed if it agreed on
> >> all counts.  Indeed it does not.  I did this:
> >>
> >> +      /* If this symbol got a global GOT entry, we might have to decay
> >> +        GOT_PAGE/GOT_OFST to GOT_DISP/addend.  We check whether we need
> >> +        to decay, because if we don't need to it's possible that no GOT
> >> +        entry was allocated in this input BFD's GOT for this reference
> >> +        (it might be in some other GOT, and out of range).  */
> >> +      if (h && (h->root.dynindx
> >> +               < mips_elf_get_global_gotsym_index (elf_hash_table (info)
> >> +                                                   ->dynobj)))
> >> +       BFD_ASSERT (_bfd_elf_symbol_refs_local_p (h, info, 1));
> >> +      local_p = local_p || _bfd_elf_symbol_refs_local_p (h, info, 1);
> >>
> >> and built world; the assertion failed a number of times.
> >
> > Interesting.  I'll see if I can reproduce.
> 
> I couldn't.  The condition didn't trigger in my own build world (done
> with CVS binutils & gcc).  It also didn't trigger in an IRIX bootstrap,
> although there's admittedly not much opportunity for it to.  FWIW, I've
> attached the patch I was using belong.
> 
> Could you send me the ranlib testcase?  Or make it available for
> ftp if it's big?

I have put it at:
  http://www.false.org/~drow/binutils-mips-got.tgz

It only takes two files to reproduce.  Examples:

% mips64_fp_be-ld libbfd-2.14.so xatexit.o
mips64_fp_be-ld: warning: cannot find entry symbol __start; defaulting to 00000000100003e0
mips64_fp_be-ld: BFD 2.14 20030612 (MontaVista 2.14-18.0.0.nevyn 2004-02-10) assertion fail ../../bfd/elfxx-mips.c:3259
mips64_fp_be-ld: BFD 2.14 20030612 (MontaVista 2.14-18.0.0.nevyn 2004-02-10) assertion fail ../../bfd/elfxx-mips.c:1797
mips64_fp_be-ld: BFD 2.14 20030612 (MontaVista 2.14-18.0.0.nevyn 2004-02-10) assertion fail ../../bfd/elfxx-mips.c:3259
mips64_fp_be-ld: BFD 2.14 20030612 (MontaVista 2.14-18.0.0.nevyn 2004-02-10) assertion fail ../../bfd/elfxx-mips.c:3259
mips64_fp_be-ld: BFD 2.14 20030612 (MontaVista 2.14-18.0.0.nevyn 2004-02-10) assertion fail ../../bfd/elfxx-mips.c:1797
mips64_fp_be-ld: BFD 2.14 20030612 (MontaVista 2.14-18.0.0.nevyn 2004-02-10) assertion fail ../../bfd/elfxx-mips.c:3259

% mips64_fp_be-ld xatexit.o libbfd-2.14.so
mips64_fp_be-ld: warning: cannot find entry symbol __start; defaulting to 0000000010000400

%

My patch is the same as the one you attached.  This is not CVS HEAD
binutils; it's possible that there's something else wrong in my local
tree, but at this point elfxx-mips.c is pretty much the same as it is
in HEAD.  I can try to reproduce in HEAD next week.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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