From: Eric Andersen Date: Thu, 13 Jul 2006 17:26:01 +0000 (-0000) Subject: yet another fix for yet another cross depmod endianness problem X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1de8a181281a22d163c701df5321baf3bd9ccf5f;p=buildroot.git yet another fix for yet another cross depmod endianness problem --- diff --git a/package/modutils/modutils-cross.patch b/package/modutils/modutils-cross.patch index e2fef3ac87..c62f8860ad 100644 --- a/package/modutils/modutils-cross.patch +++ b/package/modutils/modutils-cross.patch @@ -481,6 +481,27 @@ diff -urN modutils-2.4.27.0.orig/util/modstat.c modutils-2.4.27.0/util/modstat.c 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 @@