diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/module.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index fee7c36349eb..016d6a0830a3 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -193,8 +193,17 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
193 | offset -= 0x02000000; | 193 | offset -= 0x02000000; |
194 | offset += sym->st_value - loc; | 194 | offset += sym->st_value - loc; |
195 | 195 | ||
196 | /* only Thumb addresses allowed (no interworking) */ | 196 | /* |
197 | if (!(offset & 1) || | 197 | * For function symbols, only Thumb addresses are |
198 | * allowed (no interworking). | ||
199 | * | ||
200 | * For non-function symbols, the destination | ||
201 | * has no specific ARM/Thumb disposition, so | ||
202 | * the branch is resolved under the assumption | ||
203 | * that interworking is not required. | ||
204 | */ | ||
205 | if ((ELF32_ST_TYPE(sym->st_info) == STT_FUNC && | ||
206 | !(offset & 1)) || | ||
198 | offset <= (s32)0xff000000 || | 207 | offset <= (s32)0xff000000 || |
199 | offset >= (s32)0x01000000) { | 208 | offset >= (s32)0x01000000) { |
200 | pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n", | 209 | pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n", |