summaryrefslogtreecommitdiff
path: root/recipes/linux
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux')
-rw-r--r--recipes/linux/linux-omap-2.6.29/2.6.29_relocation_1.patch11
-rw-r--r--recipes/linux/linux-omap-2.6.29/2.6.29_relocation_2.patch33
-rw-r--r--recipes/linux/linux-omap_2.6.29.bb2
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 0000000000..627f03c785
--- /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 0000000000..caa8dd533d
--- /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 465d5adc00..130f9a8f69 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 \
"