summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-2.6.29/micro2440/0005-920T-Temp-fix-for-the-40-relocation-binutils-pro.patch
diff options
context:
space:
mode:
authorFlorian Boor <florian.boor@kernelconcepts.de>2009-04-15 11:49:06 +0200
committerFlorian Boor <florian.boor@kernelconcepts.de>2009-04-15 11:59:02 +0200
commit0328f2d7844b000c71650a14d8479fcf98b1a58e (patch)
tree60abb9d4eb43b4f0727649b1613af3224d678115 /recipes/linux/linux-2.6.29/micro2440/0005-920T-Temp-fix-for-the-40-relocation-binutils-pro.patch
parent99fc9b7e925353cd03fde3847416379815436dd1 (diff)
linux: initial micro2440 support for 2.6.29 using mini2440 kernel patches.
Diffstat (limited to 'recipes/linux/linux-2.6.29/micro2440/0005-920T-Temp-fix-for-the-40-relocation-binutils-pro.patch')
-rw-r--r--recipes/linux/linux-2.6.29/micro2440/0005-920T-Temp-fix-for-the-40-relocation-binutils-pro.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes/linux/linux-2.6.29/micro2440/0005-920T-Temp-fix-for-the-40-relocation-binutils-pro.patch b/recipes/linux/linux-2.6.29/micro2440/0005-920T-Temp-fix-for-the-40-relocation-binutils-pro.patch
new file mode 100644
index 0000000000..6b8aaf4445
--- /dev/null
+++ b/recipes/linux/linux-2.6.29/micro2440/0005-920T-Temp-fix-for-the-40-relocation-binutils-pro.patch
@@ -0,0 +1,49 @@
+From a4cba996cb77da4afc26c35402a70c3f008afe96 Mon Sep 17 00:00:00 2001
+From: Michel Pollet <buserror@gmail.com>
+Date: Sat, 14 Mar 2009 10:34:32 +0000
+Subject: [PATCH] 920T: Temp(?) fix for the 40 relocation binutils problem
+
+This prevents the modules failing to load when made
+with modern toolchains. There is no way to prevent binutils
+to generate these relocations, and on the 920t they are
+in fact not needed. So this patch just skip them.
+
+Signed-off-by: Michel Pollet <buserror@gmail.com>
+---
+ arch/arm/include/asm/elf.h | 1 +
+ arch/arm/kernel/module.c | 7 +++++++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
+index a58378c..ce3b36e 100644
+--- a/arch/arm/include/asm/elf.h
++++ b/arch/arm/include/asm/elf.h
+@@ -50,6 +50,7 @@ typedef struct user_fp elf_fpregset_t;
+ #define R_ARM_ABS32 2
+ #define R_ARM_CALL 28
+ #define R_ARM_JUMP24 29
++#define R_ARM_V4BX 40
+
+ /*
+ * These are used to set parameters in the core dumps.
+diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
+index dab48f2..fa03392 100644
+--- a/arch/arm/kernel/module.c
++++ b/arch/arm/kernel/module.c
+@@ -132,6 +132,13 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
+ *(u32 *)loc |= offset & 0x00ffffff;
+ break;
+
++#ifdef CONFIG_CPU_ARM920T
++ /* modern toolchain generate V4BX for the modules, and there is no
++ * way to skip them being generated in the .ko, so in our case, we just
++ * can ignore them */
++ case R_ARM_V4BX: /* Ignore these sections */
++ break;
++#endif
+ default:
+ printk(KERN_ERR "%s: unknown relocation: %u\n",
+ module->name, ELF32_R_TYPE(rel->r_info));
+--
+1.5.6.3
+