aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/elf.h1
-rw-r--r--arch/arm/kernel/module.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index a58378c343b9..ce3b36e9df81 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;
50#define R_ARM_ABS32 2 50#define R_ARM_ABS32 2
51#define R_ARM_CALL 28 51#define R_ARM_CALL 28
52#define R_ARM_JUMP24 29 52#define R_ARM_JUMP24 29
53#define R_ARM_V4BX 40
53 54
54/* 55/*
55 * These are used to set parameters in the core dumps. 56 * 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 dab48f27263f..9f509fd00fda 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -132,6 +132,15 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
132 *(u32 *)loc |= offset & 0x00ffffff; 132 *(u32 *)loc |= offset & 0x00ffffff;
133 break; 133 break;
134 134
135 case R_ARM_V4BX:
136 /* Preserve Rm and the condition code. Alter
137 * other bits to re-code instruction as
138 * MOV PC,Rm.
139 */
140 *(u32 *)loc &= 0xf000000f;
141 *(u32 *)loc |= 0x01a0f000;
142 break;
143
135 default: 144 default:
136 printk(KERN_ERR "%s: unknown relocation: %u\n", 145 printk(KERN_ERR "%s: unknown relocation: %u\n",
137 module->name, ELF32_R_TYPE(rel->r_info)); 146 module->name, ELF32_R_TYPE(rel->r_info));