diff options
author | Daniel Jacobowitz <drow@false.org> | 2005-12-14 17:04:22 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-12-14 17:04:22 -0500 |
commit | c2e2611425a956d25d2948c5d95d3848c4db1257 (patch) | |
tree | 54f6e333ff805a0a0eb63299f0adaa4d11544ab5 | |
parent | 1ee9530a71686436dbeb5f31dd5b925c39cf71d7 (diff) |
[ARM] 3205/1: Handle new EABI relocations when loading kernel modules.
Patch from Daniel Jacobowitz
Handle new EABI relocations when loading kernel modules. This is
necessary for CONFIG_AEABI kernels, and also for some broken
(since fixed) old ABI toolchains.
Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/kernel/module.c | 2 | ||||
-rw-r--r-- | include/asm-arm/elf.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 6055e1427ba3..055bf5d28894 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -101,6 +101,8 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
101 | break; | 101 | break; |
102 | 102 | ||
103 | case R_ARM_PC24: | 103 | case R_ARM_PC24: |
104 | case R_ARM_CALL: | ||
105 | case R_ARM_JUMP24: | ||
104 | offset = (*(u32 *)loc & 0x00ffffff) << 2; | 106 | offset = (*(u32 *)loc & 0x00ffffff) << 2; |
105 | if (offset & 0x02000000) | 107 | if (offset & 0x02000000) |
106 | offset -= 0x04000000; | 108 | offset -= 0x04000000; |
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 7da97a937548..2d44b42d1847 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h | |||
@@ -22,6 +22,8 @@ typedef unsigned long elf_freg_t[3]; | |||
22 | #define R_ARM_NONE 0 | 22 | #define R_ARM_NONE 0 |
23 | #define R_ARM_PC24 1 | 23 | #define R_ARM_PC24 1 |
24 | #define R_ARM_ABS32 2 | 24 | #define R_ARM_ABS32 2 |
25 | #define R_ARM_CALL 28 | ||
26 | #define R_ARM_JUMP24 29 | ||
25 | 27 | ||
26 | #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) | 28 | #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) |
27 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 29 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |