diff options
| author | James Morris <jmorris@namei.org> | 2011-06-30 18:43:56 +1000 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2011-06-30 18:43:56 +1000 |
| commit | 5b944a71a192977c1c018bbcfa0c52dca48e2368 (patch) | |
| tree | 9f234c4a93bb28890ad086c846d2bf0b35f7f7ae /arch/arm/kernel/module.c | |
| parent | 0e4ae0e0dec634b2ae53ac57d14141b140467dbe (diff) | |
| parent | c017d0d1351f916c0ced3f358afc491fdcf490b4 (diff) | |
| download | linux-5b944a71a192977c1c018bbcfa0c52dca48e2368.tar.gz linux-5b944a71a192977c1c018bbcfa0c52dca48e2368.tar.bz2 linux-5b944a71a192977c1c018bbcfa0c52dca48e2368.zip | |
Merge branch 'linus' into next
Diffstat (limited to 'arch/arm/kernel/module.c')
| -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, offset -= 0x02000000; offset += sym->st_value - loc; - /* only Thumb addresses allowed (no interworking) */ - if (!(offset & 1) || + /* + * For function symbols, only Thumb addresses are + * allowed (no interworking). + * + * For non-function symbols, the destination + * has no specific ARM/Thumb disposition, so + * the branch is resolved under the assumption + * that interworking is not required. + */ + if ((ELF32_ST_TYPE(sym->st_info) == STT_FUNC && + !(offset & 1)) || offset <= (s32)0xff000000 || offset >= (s32)0x01000000) { pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n", |
