OSDN Git Service

lkdtm: mark execute_location as noinline
authorArnd Bergmann <arnd@arndb.de>
Mon, 8 Feb 2016 14:34:21 +0000 (15:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Feb 2016 01:31:50 +0000 (17:31 -0800)
commitececdc021ba8f48ce87f476dd412e2ed50f9cd8e
tree3c649f26ef282f62c9051983b9c93f87632aa7d1
parentc074abe02e5e3479b2dfd109fa2620d22d351c34
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>
drivers/misc/lkdtm.c