[oe-commits] Koen Kooi : linux-omap 2.6.29: backport some relocations from .31, this is needed if you are using one of those broken CSL binutils

git version control git at git.openembedded.org
Wed Nov 4 12:04:01 UTC 2009


Module: openembedded.git
Branch: shr/merge
Commit: 358b3c8894088e196747a1f64961d43d9656c3e1
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=358b3c8894088e196747a1f64961d43d9656c3e1

Author: Koen Kooi <koen at openembedded.org>
Date:   Wed Nov  4 11:46:36 2009 +0100

linux-omap 2.6.29: backport some relocations from .31, this is needed if you are using one of those broken CSL binutils

---

 .../linux-omap-2.6.29/2.6.29_relocation_1.patch    |   11 ++++++
 .../linux-omap-2.6.29/2.6.29_relocation_2.patch    |   33 ++++++++++++++++++++
 recipes/linux/linux-omap_2.6.29.bb                 |    2 +
 3 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/recipes/linux/linux-omap-2.6.29/2.6.29_relocation_1.patch b/recipes/linux/linux-omap-2.6.29/2.6.29_relocation_1.patch
new file mode 100644
index 0000000..627f03c
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/2.6.29_relocation_1.patch
@@ -0,0 +1,11 @@
+--- /tmp/elf.h	2009-11-03 20:29:16.000000000 +0100
++++ git/arch/arm/include/asm/elf.h	2009-11-03 20:29:40.000000000 +0100
+@@ -50,6 +50,8 @@
+ #define R_ARM_ABS32	2
+ #define R_ARM_CALL	28
+ #define R_ARM_JUMP24	29
++#define R_ARM_MOVW_ABS_NC 43
++#define R_ARM_MOVT_ABS 44
+ 
+ /*
+  * These are used to set parameters in the core dumps.
diff --git a/recipes/linux/linux-omap-2.6.29/2.6.29_relocation_2.patch b/recipes/linux/linux-omap-2.6.29/2.6.29_relocation_2.patch
new file mode 100644
index 0000000..caa8dd5
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/2.6.29_relocation_2.patch
@@ -0,0 +1,33 @@
+--- /tmp/module.c	2009-11-03 20:30:56.000000000 +0100
++++ git/arch/arm/kernel/module.c	2009-11-03 20:34:33.000000000 +0100
+@@ -83,6 +83,7 @@
+ 		unsigned long loc;
+ 		Elf32_Sym *sym;
+ 		s32 offset;
++		s32 addend;
+ 
+ 		offset = ELF32_R_SYM(rel->r_info);
+ 		if (offset < 0 || offset > (symsec->sh_size / sizeof(Elf32_Sym))) {
+@@ -132,6 +133,22 @@
+ 			*(u32 *)loc |= offset & 0x00ffffff;
+ 			break;
+ 
++		case R_ARM_MOVW_ABS_NC:
++		case R_ARM_MOVT_ABS:
++			offset = sym->st_value;
++
++			addend = ((*(u32 *)loc >> 4) & 0xf000) | (*(u32 *)loc &0xfff);
++			addend = (addend ^ 0x8000) - 0x8000;
++			offset += addend;
++
++			if (ELF32_R_TYPE(rel->r_info) == R_ARM_MOVT_ABS)
++				offset >>= 16;
++
++			*(u32 *)loc &= 0xfff0f000;
++			*(u32 *)loc |= offset & 0xfff;
++			*(u32 *)loc |= (offset & 0xf000) << 4;
++			break;
++
+ 		default:
+ 			printk(KERN_ERR "%s: unknown relocation: %u\n",
+ 			       module->name, ELF32_R_TYPE(rel->r_info));
diff --git a/recipes/linux/linux-omap_2.6.29.bb b/recipes/linux/linux-omap_2.6.29.bb
index 465d5ad..130f9a8 100644
--- a/recipes/linux/linux-omap_2.6.29.bb
+++ b/recipes/linux/linux-omap_2.6.29.bb
@@ -166,6 +166,8 @@ SRC_URI_append = " \
            file://arch-has-holes.diff;patch=1 \
            file://cache/l1cache-shift.patch;patch=1 \
            file://cache/copy-page-tweak.patch;patch=1 \
+           file://2.6.29_relocation_1.patch;patch=1 \
+           file://2.6.29_relocation_2.patch;patch=1 \
 "
 
 





More information about the Openembedded-commits mailing list