]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels
authorJon Medhurst <jon.medhurst@linaro.org>
Thu, 24 Nov 2011 12:01:08 +0000 (13:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 26 Nov 2011 21:58:53 +0000 (21:58 +0000)
commitd8fcea0fbe8cfe2f2349d7a27e81703ae857f469
treeb702b16e613ce805a89dd57184f2f6b3dcc8c87f
parente50317caaa6fac17abb89a5ef32cdca4d66e5fe1
ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels

When compiling kprobes-test-thumb.c an error like below may occur:

/tmp/ccKcuJcG.s:19179: Error: offset out of range

This is caused by the compiler underestimating the size of the inline
assembler instructions containing ".space 0x1000" and failing to spill
the literal pool in time to prevent the generation of PC relative load
instruction with invalid offsets.

The fix implemented by this patch is to replace a single large .space
directive by a number of 4 byte .space's. This requires splitting the
macros which generate test cases for branch instructions into two forms:
one with, and one without support for inserting extra code between
branch and target.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Jon Medhurst <jon.medhurst@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/kprobes-test-thumb.c
arch/arm/kernel/kprobes-test.h