diff options
author | Eric Andersen <andersen@codepoet.org> | 2006-07-13 17:26:01 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2006-07-13 17:26:01 +0000 |
commit | 1de8a181281a22d163c701df5321baf3bd9ccf5f (patch) | |
tree | 9f7b5d00dd303c7f008f5c627843ee509a2bad83 /package | |
parent | c4ad37ff4effcb3d1307d4ee14940ddaf58cc87a (diff) |
yet another fix for yet another cross depmod endianness problem
Diffstat (limited to 'package')
-rw-r--r-- | package/modutils/modutils-cross.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/package/modutils/modutils-cross.patch b/package/modutils/modutils-cross.patch index e2fef3ac8..c62f8860a 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 @@ |