This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: sparc testsuite failures
Alan's suggested patch makes the testsuite problem for PR 48 go away :)
Cheers,
/ChJ
On Thu, Apr 08, 2004 at 04:21:35PM +0200, Christian Joensson wrote:
> Is something similar needed in elf64-sparc.c at line no 2412?
>
> Cheers,
>
> /ChJ
>
> BTW, testing the below suggested patch right now on sparc-linux.
>
>
> On Thu, Apr 08, 2004 at 01:41:42AM +0930, Alan Modra wrote:
> > Hi Jakub,
> > There are a number of open binutils bug reports for sparc. This patch
> > should fix PR 48.
> >
> > * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
> > when statically linking PIC code.
> >
> > Testing h->plt.offset isn't sufficient because when no dynamic objects
> > are involved in the link, h->plt.offset is still a refcount.
> > size_dynamic_sections isn't run.
> >
> > PR 49 and PR 50 look like they are a result of the sparc backend not
> > being updated to use SYMBOL_CALLS_LOCAL. Do you plan to fix this
> > before 2.15?
> >
> > Index: bfd/elf32-sparc.c
> > ===================================================================
> > RCS file: /cvs/src/src/bfd/elf32-sparc.c,v
> > retrieving revision 1.65
> > diff -u -p -r1.65 elf32-sparc.c
> > --- bfd/elf32-sparc.c 27 Mar 2004 10:58:07 -0000 1.65
> > +++ bfd/elf32-sparc.c 7 Apr 2004 15:08:05 -0000
> > @@ -2323,16 +2323,13 @@ elf32_sparc_relocate_section (output_bfd
> > if (h == NULL)
> > break;
> >
> > - if (h->plt.offset == (bfd_vma) -1)
> > + if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL)
> > {
> > /* We didn't make a PLT entry for this symbol. This
> > happens when statically linking PIC code, or when
> > using -Bsymbolic. */
> > break;
> > }
> > -
> > - if (htab->splt == NULL)
> > - abort ();
> >
> > relocation = (htab->splt->output_section->vma
> > + htab->splt->output_offset
> >
> >
> > --
> > Alan Modra
> > IBM OzLabs - Linux Technology Centre