sparc testsuite failures

Alan Modra amodra@bigpond.net.au
Wed Apr 7 16:11:00 GMT 2004


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



More information about the Binutils mailing list