diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-02-08 14:34:21 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-10 01:31:50 (GMT) |
commit | ececdc021ba8f48ce87f476dd412e2ed50f9cd8e (patch) | |
tree | 3c649f26ef282f62c9051983b9c93f87632aa7d1 /drivers/misc | |
parent | c074abe02e5e3479b2dfd109fa2620d22d351c34 (diff) | |
download | linux-ececdc021ba8f48ce87f476dd412e2ed50f9cd8e.tar.xz |
lkdtm: mark execute_location as noinline
The kernel sometimes fails to link when lkdrm is built-in and
compiled with clang:
relocation truncated to fit: R_ARM_THM_CALL against `.bss'
The reason here is that a relocation from .text to .bss fails to
generate a trampoline because .bss is not an executable section.
Marking the function 'noinline' turns the relative branch to .bss
into an absolute branch to the function argument, and that works
fine.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/lkdtm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c index 11fdadc..5c1351b 100644 --- a/drivers/misc/lkdtm.c +++ b/drivers/misc/lkdtm.c @@ -335,7 +335,7 @@ static noinline void corrupt_stack(void) memset((void *)data, 0, 64); } -static void execute_location(void *dst) +static void noinline execute_location(void *dst) { void (*func)(void) = dst; |