This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: sparc testsuite failures
- From: Christian Joensson <christian at j-son dot org>
- To: Jakub Jelinek <jakub at redhat dot com>, binutils at sources dot redhat dot com
- Cc: Alan Modra <amodra at bigpond dot net dot au>
- Date: Thu, 8 Apr 2004 16:21:35 +0200
- Subject: Re: sparc testsuite failures
- References: <20040407161142.GI5487@bubble.modra.org>
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