]> asedeno.scripts.mit.edu Git - linux.git/commit
ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled
authorJoseph Lo <josephl@nvidia.com>
Mon, 15 Apr 2013 22:50:54 +0000 (16:50 -0600)
committerOlof Johansson <olof@lixom.net>
Thu, 18 Apr 2013 16:30:40 +0000 (09:30 -0700)
commita65dc10ffad1e041b4ad3559a026a8bb2b40b77e
tree4f869668419ba6ecfc668813edf5f2311e7ff1b6
parent5777b4b5778b9b44ee8b1476521ffcb8e527876d
ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled

The conditional branch instruction in Thumb2 only available to short range.
The linker will fail when the conditional branch over the range. Then
resulting in link error when generating kernel image. e.g.:

arch/arm/mach-tegra/reset-handler.S:47:(.text+0xf8e):
relocation truncated to fit: R_ARM_THM_JUMP19 against symbol
`cpu_resume' defined in .data section in arch/arm/kernel/built-in.o

This patch using a Thumb2 instruction IT (if-then) to have a longer branch
range.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-tegra/reset-handler.S