提交 c2e26114 编写于 作者: D Daniel Jacobowitz 提交者: Russell King

[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: NDaniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 1ee9530a
...@@ -101,6 +101,8 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, ...@@ -101,6 +101,8 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
break; break;
case R_ARM_PC24: case R_ARM_PC24:
case R_ARM_CALL:
case R_ARM_JUMP24:
offset = (*(u32 *)loc & 0x00ffffff) << 2; offset = (*(u32 *)loc & 0x00ffffff) << 2;
if (offset & 0x02000000) if (offset & 0x02000000)
offset -= 0x04000000; offset -= 0x04000000;
......
...@@ -22,6 +22,8 @@ typedef unsigned long elf_freg_t[3]; ...@@ -22,6 +22,8 @@ typedef unsigned long elf_freg_t[3];
#define R_ARM_NONE 0 #define R_ARM_NONE 0
#define R_ARM_PC24 1 #define R_ARM_PC24 1
#define R_ARM_ABS32 2 #define R_ARM_ABS32 2
#define R_ARM_CALL 28
#define R_ARM_JUMP24 29
#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef elf_greg_t elf_gregset_t[ELF_NGREG];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册