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: sparc testsuite failures


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


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