]> err.no Git - linux-2.6/commitdiff
[ARM] Fix ARM branch relocation range
authorKevin Welton <Kevin.Welton@arm.com>
Tue, 8 May 2007 21:05:25 +0000 (22:05 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 8 May 2007 21:05:25 +0000 (22:05 +0100)
Branches in the ARM architecture are restricted to a range of +/- 32MB.
However, the code in .../arch/arm/kernel/module.c::apply_relocate() was
checking offset against a range of +/- 64MB.

Signed-off-by: Kevin Welton <Kevin.Welton@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/module.c

index 1b061583408ed7f44158a7dfcf7b996e56f7a53f..79b7e5cf5416cff90059fd145ca6a2c76d253011 100644 (file)
@@ -116,8 +116,8 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
 
                        offset += sym->st_value - loc;
                        if (offset & 3 ||
-                           offset <= (s32)0xfc000000 ||
-                           offset >= (s32)0x04000000) {
+                           offset <= (s32)0xfe000000 ||
+                           offset >= (s32)0x02000000) {
                                printk(KERN_ERR
                                       "%s: relocation out of range, section "
                                       "%d reloc %d sym '%s'\n", module->name,