svn commit: trunk/buildroot/package/modutils

andersen at uclibc.org andersen at uclibc.org
Thu Jul 13 17:26:03 UTC 2006


Author: andersen
Date: 2006-07-13 10:26:01 -0700 (Thu, 13 Jul 2006)
New Revision: 15694

Log:
yet another fix for yet another cross depmod endianness problem


Modified:
   trunk/buildroot/package/modutils/modutils-cross.patch


Changeset:
Modified: trunk/buildroot/package/modutils/modutils-cross.patch
===================================================================
--- trunk/buildroot/package/modutils/modutils-cross.patch	2006-07-13 17:06:43 UTC (rev 15693)
+++ trunk/buildroot/package/modutils/modutils-cross.patch	2006-07-13 17:26:01 UTC (rev 15694)
@@ -481,6 +481,27 @@
  		    intsym->r_type = ELFW(R_TYPE)(rel->r_info);
  		  }
  	      }
+--- modutils-2.4.27/obj/obj_reloc.c.orig	2003-10-26 18:25:08.000000000 -0800
++++ modutils-2.4.27/obj/obj_reloc.c	2006-06-20 17:47:11.000000000 -0700
+@@ -331,6 +331,18 @@
+ 	  value += rel->r_addend;
+ #endif
+ 
++	  /* Byte swap if necessary. For some archs, other adjustments may
++	     need to be done in arch_apply_relocation. */
++	  if (byteswap==1)
++	    {
++	      if (sizeof(unsigned tgt_long) == 4)
++		*(tgt_long *)(targsec->contents + rel->r_offset) =
++		  bswap_32(*(tgt_long *)(targsec->contents + rel->r_offset));
++	      else if (sizeof(unsigned tgt_long) == 8)
++		*(tgt_long *)(targsec->contents + rel->r_offset) =
++		  bswap_64(*(tgt_long *)(targsec->contents + rel->r_offset));
++	    }
++
+ 	  /* Do it! */
+ 	  switch (arch_apply_relocation(f,targsec,symsec,intsym,rel,value))
+ 	    {
 --- odutils-2.4.27.0.orig/include/module.h.orig	2006-01-10 08:15:09.000000000 -0700
 +++ odutils-2.4.27.0/include/module.h	2006-01-10 08:15:13.000000000 -0700
 @@ -88,16 +88,34 @@




More information about the uClibc-cvs mailing list