Skip to content

Commit

Permalink
ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joseph Lo authored and Olof Johansson committed Apr 18, 2013
1 parent 5777b4b commit a65dc10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-tegra/reset-handler.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ENTRY(tegra_resume)

cpu_id r0
cmp r0, #0 @ CPU0?
THUMB( it ne )
bne cpu_resume @ no

#ifdef CONFIG_ARCH_TEGRA_3x_SOC
Expand Down

0 comments on commit a65dc10

Please sign in to comment.