svn commit: trunk/uClibc/libc/sysdeps/linux/bfin

bernds at uclibc.org bernds at uclibc.org
Thu Nov 22 19:27:43 UTC 2007


Author: bernds
Date: 2007-11-22 11:27:42 -0800 (Thu, 22 Nov 2007)
New Revision: 20480

Log:
Ignore entries of "-1" in rofixup; the linker sometimes has no choice but to
create these for deleted entries in .eh_frame.


Modified:
   trunk/uClibc/libc/sysdeps/linux/bfin/crtreloc.c


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/bfin/crtreloc.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/bfin/crtreloc.c	2007-11-22 18:26:26 UTC (rev 20479)
+++ trunk/uClibc/libc/sysdeps/linux/bfin/crtreloc.c	2007-11-22 19:27:42 UTC (rev 20480)
@@ -47,32 +47,35 @@
 {
   while (p < e)
     {
-      void *ptr = __reloc_pointer (*p, map);
-      if (ptr)
+      if (*p != (void **)-1)
 	{
-	  void *pt;
-	  if ((long)ptr & 3)
+	  void *ptr = __reloc_pointer (*p, map);
+	  if (ptr != (void *)-1)
 	    {
-	      unsigned char *c = ptr;
-	      int i;
-	      unsigned long v = 0;
-	      for (i = 0; i < 4; i++)
-		v |= c[i] << 8 * i;
-	      pt = (void *)v;
+	      void *pt;
+	      if ((long)ptr & 3)
+		{
+		  unsigned char *c = ptr;
+		  int i;
+		  unsigned long v = 0;
+		  for (i = 0; i < 4; i++)
+		    v |= c[i] << 8 * i;
+		  pt = (void *)v;
+		}
+	      else
+		pt = *(void**)ptr;
+	      pt = __reloc_pointer (pt, map);
+	      if ((long)ptr & 3)
+		{
+		  unsigned char *c = ptr;
+		  int i;
+		  unsigned long v = (unsigned long)pt;
+		  for (i = 0; i < 4; i++, v >>= 8)
+		    c[i] = v;
+		}
+	      else
+		*(void**)ptr = pt;
 	    }
-	  else
-	    pt = *(void**)ptr;
-	  pt = __reloc_pointer (pt, map);
-	  if ((long)ptr & 3)
-	    {
-	      unsigned char *c = ptr;
-	      int i;
-	      unsigned long v = (unsigned long)pt;
-	      for (i = 0; i < 4; i++, v >>= 8)
-		c[i] = v;
-	    }
-	  else
-	    *(void**)ptr = pt;
 	}
       p++;
     }




More information about the uClibc-cvs mailing list