aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/kernel/module.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-27 08:58:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-27 08:58:23 -0700
commitedcda265225b90c8700b21758fffcba61d19e046 (patch)
tree5bc62e95df24004c46b9893b636296091c2f824a /arch/arm/kernel/module.c
parent9c317b3bed40fed07e2ed536afca3b58952ac432 (diff)
parent111b20d01346b9635b3223c7af4e40e43bee8dc6 (diff)
Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm: ARM: pm: ensure ARMv7 CPUs save and restore the TLS register ARM: pm: proc-v7: fix missing struct processor pointers for suspend code ARM: 6969/1: plat-iop: fix build error ARM: 6961/1: zImage: Add build-time check for correctly-sized proc_type entries ARM: SMP: wait for CPU to be marked active ARM: 6963/1: Thumb-2: Relax relocation requirements for non-function symbols ARM: 6962/1: mach-h720x: fix build error ARM: 6959/1: SMP build fix for entry-macro-multi.S
Diffstat (limited to 'arch/arm/kernel/module.c')
-rw-r--r--arch/arm/kernel/module.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index fee7c36349e..016d6a0830a 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",