This is the mail archive of the binutils@sourceware.org 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]

[PATCH] fix ld testsuite failures with gcc 3.3.x on i386 (was Re: Binutils 2.18 available)


>>> "Jan Beulich" <jbeulich@novell.com> 21.09.07 10:39 >>>
>Your request to apply the same change to R_386_GNU_VTINHERIT as was
>suggested by Michael for handling R_386_GNU_VTENTRY (in
>http://sourceware.org/ml/binutils/2007-07/msg00438.html) was apparently
>wrong: Looking at the two functions bfd_elf_gc_record_vtinherit() and
>bfd_elf_gc_record_vtentry() reveals the significant difference that the
>former is prepared to deal with h being NULL, while the latter isn't. Beyond
>requesting to revert that part of the patch I'm also curious to understand
>why the same change wasn't applied to all other affected instances in
>various elf<width>-<arch>.c files (which accounts for the odd situation
>that, as described in Daniel's response, mentioned tests succeed for x86-64
>whereas they fail for i386).
>
>Jan
>
>>>> Daniel Jacobowitz <drow@false.org> 29.08.07 18:35 >>>
>On Wed, Aug 29, 2007 at 04:32:52PM +0100, Jan Beulich wrote:
>> >How on earth did you get an R_386_GNU_VTINHERIT?  You must be using a
>> >much older compiler than I am.
>> 
>> gcc 3.3.1 (SuSE 9.0) - are 3.3.x compilers not supported anymore?
>
>Of course they are.  I don't know if -fvtable-gc is, though.  I know
>that recent GCC's no longer emit .vtable_inherit, so it is likely that
>the support is starting to rot.
>
>     # Starting with 3.4.0, -fvtable-gc is no longer supported and thus
>     # the functionality we try to test for cannot be expected to work.
>
>selective4 and selective5 pass for me on x86_64-linux with GCC 3.3,
>FWIW.

Built (with --enable-targets=all) and tested on x86_64-unknown-linux-gnu.

bfd/
2007-09-26  Jan Beulich  <jbeulich@novell.com>

	* elf32-i386.c (elf_i386_check_relocs): Revert NULL pointer
	check for R_386_GNU_VTINHERIT.
	* elf-m10300.c (mn10300_elf_check_relocs): Check for NULL
	pointer for R_xxx_GNU_VTENTRY.
	* elf32-arm.c (elf32_arm_check_relocs): Likewise.
	* elf32-bfin.c (bfin_check_relocs): Likewise.
	(bfinfdpic_check_relocs): Likewise.
	* elf32-cris.c (cris_elf_check_relocs): Likewise.
	* elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
	* elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
	* elf32-fr30.c (fr30_elf_check_relocs): Likewise.
	* elf32-frv.c (elf32_frv_check_relocs): Likewise.
	* elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
	* elf32-m32r.c (m32r_elf_check_relocs): Likewise.
	* elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
	* elf32-m68k.c (elf_m68k_check_relocs): Likewise.
	* elf32-mcore.c (mcore_elf_check_relocs): Likewise.
	* elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
	* elf32-ppc.c (ppc_elf_check_relocs): Likewise.
	* elf32-s390.c (elf_s390_check_relocs): Likewise.
	* elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
	* elf32-sh.c (sh_elf_check_relocs): Likewise.
	* elf32-v850.c (v850_elf_check_relocs): Likewise.
	* elf32-vax.c (elf_vax_check_relocs): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
	* elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
	* elf64-mmix.c (mmix_elf_check_relocs): Likewise.
	* elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
	* elf64-s390.c (elf_s390_check_relocs): Likewise.
	* elf64-sh64.c (sh_elf64_check_relocs): Likewise.
	* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
	* elf32-hppa.c (elf32_hppa_check_relocs): Likewise. Also handle
	NULL pointer case for R_PARISC_GNU_VTINHERIT.

--- 2007-09-25/bfd/elf-m10300.c	2007-08-22 11:01:41.000000000 +0200
+++ 2007-09-25/bfd/elf-m10300.c	2007-09-26 00:00:00.000000000 +0200
@@ -758,7 +758,9 @@ mn10300_elf_check_relocs (abfd, info, se
 	/* This relocation describes which C++ vtable entries are actually
 	   used.  Record for later use during GC.  */
 	case R_MN10300_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 	case R_MN10300_GOT32:
--- 2007-09-25/bfd/elf32-arm.c	2007-09-11 12:23:30.000000000 +0200
+++ 2007-09-25/bfd/elf32-arm.c	2007-09-26 00:00:00.000000000 +0200
@@ -7795,7 +7795,9 @@ elf32_arm_check_relocs (bfd *abfd, struc
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_ARM_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
             return FALSE;
           break;
         }
--- 2007-09-25/bfd/elf32-bfin.c	2007-09-11 12:23:30.000000000 +0200
+++ 2007-09-25/bfd/elf32-bfin.c	2007-09-26 00:00:00.000000000 +0200
@@ -1979,7 +1979,9 @@ bfin_check_relocs (bfd * abfd,
         /* This relocation describes which C++ vtable entries
            are actually used.  Record for later use during GC.  */
         case R_BFIN_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 
@@ -4671,7 +4673,9 @@ bfinfdpic_check_relocs (bfd *abfd, struc
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_BFIN_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 
--- 2007-09-25/bfd/elf32-cris.c	2007-08-22 11:01:41.000000000 +0200
+++ 2007-09-25/bfd/elf32-cris.c	2007-09-26 00:00:00.000000000 +0200
@@ -2853,7 +2853,9 @@ cris_elf_check_relocs (abfd, info, sec, 
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_CRIS_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 
--- 2007-09-25/bfd/elf32-d10v.c	2007-08-22 11:01:41.000000000 +0200
+++ 2007-09-25/bfd/elf32-d10v.c	2007-09-26 00:00:00.000000000 +0200
@@ -304,7 +304,9 @@ elf32_d10v_check_relocs (bfd *abfd,
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_D10V_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
             return FALSE;
           break;
         }
--- 2007-09-25/bfd/elf32-dlx.c	2007-08-22 11:01:41.000000000 +0200
+++ 2007-09-25/bfd/elf32-dlx.c	2007-09-26 00:00:00.000000000 +0200
@@ -470,7 +470,9 @@ elf32_dlx_check_relocs (bfd *abfd,
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_DLX_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
         }
--- 2007-09-25/bfd/elf32-fr30.c	2007-08-22 11:01:41.000000000 +0200
+++ 2007-09-25/bfd/elf32-fr30.c	2007-09-26 00:00:00.000000000 +0200
@@ -716,7 +716,9 @@ fr30_elf_check_relocs (abfd, info, sec, 
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_FR30_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
         }
--- 2007-09-25/bfd/elf32-frv.c	2007-08-22 11:01:41.000000000 +0200
+++ 2007-09-25/bfd/elf32-frv.c	2007-09-26 00:00:00.000000000 +0200
@@ -6400,7 +6400,9 @@ elf32_frv_check_relocs (abfd, info, sec,
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_FRV_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 
--- 2007-09-25/bfd/elf32-hppa.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-hppa.c	2007-09-26 00:00:00.000000000 +0200
@@ -1271,14 +1271,18 @@ elf32_hppa_check_relocs (bfd *abfd,
 	  /* This relocation describes the C++ object vtable hierarchy.
 	     Reconstruct it for later use during GC.  */
 	case R_PARISC_GNU_VTINHERIT:
-	  if (!bfd_elf_gc_record_vtinherit (abfd, sec, &hh->eh, rela->r_offset))
+	  if (!bfd_elf_gc_record_vtinherit (abfd, sec,
+					    hh != NULL ? &hh->eh : NULL,
+					    rela->r_offset))
 	    return FALSE;
 	  continue;
 
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_PARISC_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, &hh->eh, rela->r_addend))
+	  BFD_ASSERT (hh != NULL);
+	  if (hh != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, &hh->eh, rela->r_addend))
 	    return FALSE;
 	  continue;
 
--- 2007-09-25/bfd/elf32-i386.c	2007-09-11 17:24:45.000000000 +0200
+++ 2007-09-25/bfd/elf32-i386.c	2007-09-21 10:41:08.000000000 +0200
@@ -1544,9 +1544,7 @@ elf_i386_check_relocs (bfd *abfd,
 	  /* This relocation describes the C++ object vtable hierarchy.
 	     Reconstruct it for later use during GC.  */
 	case R_386_GNU_VTINHERIT:
-	  BFD_ASSERT (h != NULL);
-	  if (h != NULL
-	      && !bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+	  if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf32-iq2000.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-iq2000.c	2007-09-26 00:00:00.000000000 +0200
@@ -467,7 +467,9 @@ iq2000_elf_check_relocs (bfd *abfd,
 	  /* This relocation describes which C++ vtable entries
 	     are actually used.  Record for later use during GC.  */
 	case R_IQ2000_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf32-m32r.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-m32r.c	2007-09-26 00:00:00.000000000 +0200
@@ -4036,11 +4036,15 @@ m32r_elf_check_relocs (bfd *abfd,
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_M32R_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
             return FALSE;
           break;
         case R_M32R_RELA_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
         }
--- 2007-09-25/bfd/elf32-m68hc1x.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-m68hc1x.c	2007-09-26 00:00:00.000000000 +0200
@@ -865,7 +865,9 @@ elf32_m68hc11_check_relocs (bfd *abfd, s
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_M68HC11_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
         }
--- 2007-09-25/bfd/elf32-m68k.c	2007-09-12 09:30:46.000000000 +0200
+++ 2007-09-25/bfd/elf32-m68k.c	2007-09-26 00:00:00.000000000 +0200
@@ -1042,7 +1042,9 @@ elf_m68k_check_relocs (abfd, info, sec, 
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_68K_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf32-mcore.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-mcore.c	2007-09-26 00:00:00.000000000 +0200
@@ -638,7 +638,9 @@ mcore_elf_check_relocs (bfd * abfd,
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_MCORE_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
         }
--- 2007-09-25/bfd/elf32-openrisc.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-openrisc.c	2007-09-26 00:00:00.000000000 +0200
@@ -511,7 +511,9 @@ openrisc_elf_check_relocs (bfd *abfd,
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_OPENRISC_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 	}
--- 2007-09-25/bfd/elf32-ppc.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-ppc.c	2007-09-26 00:00:00.000000000 +0200
@@ -3376,7 +3376,9 @@ ppc_elf_check_relocs (bfd *abfd,
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_PPC_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf32-s390.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-s390.c	2007-09-26 00:00:00.000000000 +0200
@@ -1376,7 +1376,9 @@ elf_s390_check_relocs (abfd, info, sec, 
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_390_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf32-score.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-score.c	2007-09-26 00:00:00.000000000 +0200
@@ -2683,7 +2683,9 @@ _bfd_score_elf_check_relocs (bfd *abfd,
           /* This relocation describes which C++ vtable entries are actually
              used.  Record for later use during GC.  */
         case R_SCORE_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
             return FALSE;
           break;
         default:
--- 2007-09-25/bfd/elf32-sh.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-sh.c	2007-09-26 00:00:00.000000000 +0200
@@ -4959,7 +4959,9 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_SH_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf32-v850.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-v850.c	2007-09-26 00:00:00.000000000 +0200
@@ -116,7 +116,9 @@ v850_elf_check_relocs (bfd *abfd,
         /* This relocation describes which C++ vtable entries
 	   are actually used.  Record for later use during GC.  */
         case R_V850_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 
--- 2007-09-25/bfd/elf32-vax.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-vax.c	2007-09-26 00:00:00.000000000 +0200
@@ -821,7 +821,9 @@ elf_vax_check_relocs (bfd *abfd, struct 
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_VAX_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf32-xstormy16.c	2007-08-22 11:01:42.000000000 +0200
+++ 2007-09-25/bfd/elf32-xstormy16.c	2007-09-26 00:00:00.000000000 +0200
@@ -512,7 +512,9 @@ xstormy16_elf_check_relocs (bfd *abfd,
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
         case R_XSTORMY16_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 	}
--- 2007-09-25/bfd/elf32-xtensa.c	2007-09-11 12:23:30.000000000 +0200
+++ 2007-09-25/bfd/elf32-xtensa.c	2007-09-26 00:00:00.000000000 +0200
@@ -944,7 +944,9 @@ elf_xtensa_check_relocs (bfd *abfd,
 	case R_XTENSA_GNU_VTENTRY:
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf64-mmix.c	2007-08-22 11:01:43.000000000 +0200
+++ 2007-09-25/bfd/elf64-mmix.c	2007-09-26 00:00:00.000000000 +0200
@@ -2029,7 +2029,9 @@ mmix_elf_check_relocs (abfd, info, sec, 
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_MMIX_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 	}
--- 2007-09-25/bfd/elf64-ppc.c	2007-09-11 12:23:30.000000000 +0200
+++ 2007-09-25/bfd/elf64-ppc.c	2007-09-26 00:00:00.000000000 +0200
@@ -4619,7 +4619,9 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_PPC64_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf64-s390.c	2007-08-22 11:01:43.000000000 +0200
+++ 2007-09-25/bfd/elf64-s390.c	2007-09-26 00:00:00.000000000 +0200
@@ -1344,7 +1344,9 @@ elf_s390_check_relocs (abfd, info, sec, 
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_390_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elf64-sh64.c	2007-08-22 11:01:43.000000000 +0200
+++ 2007-09-25/bfd/elf64-sh64.c	2007-09-26 00:00:00.000000000 +0200
@@ -2508,7 +2508,9 @@ sh_elf64_check_relocs (bfd *abfd, struct
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
         case R_SH_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 
--- 2007-09-25/bfd/elf64-x86-64.c	2007-09-11 17:24:52.000000000 +0200
+++ 2007-09-25/bfd/elf64-x86-64.c	2007-09-21 10:41:39.000000000 +0200
@@ -1378,7 +1378,9 @@ elf64_x86_64_check_relocs (bfd *abfd, st
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_X86_64_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elfxx-mips.c	2007-09-25 16:27:40.000000000 +0200
+++ 2007-09-25/bfd/elfxx-mips.c	2007-09-26 00:00:00.000000000 +0200
@@ -6709,7 +6709,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	  /* This relocation describes which C++ vtable entries are actually
 	     used.  Record for later use during GC.  */
 	case R_MIPS_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
 	    return FALSE;
 	  break;
 
--- 2007-09-25/bfd/elfxx-sparc.c	2007-08-22 11:01:43.000000000 +0200
+++ 2007-09-25/bfd/elfxx-sparc.c	2007-09-26 00:00:00.000000000 +0200
@@ -1516,7 +1516,9 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
 	  break;
 
 	case R_SPARC_GNU_VTENTRY:
-	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	  BFD_ASSERT (h != NULL);
+	  if (h != NULL
+	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 	    return FALSE;
 	  break;
 



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