]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8364/1: fix BE32 module loading
authorArnd Bergmann <arnd@arndb.de>
Mon, 18 May 2015 15:03:13 +0000 (16:03 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 2 Jun 2015 08:58:17 +0000 (09:58 +0100)
commitf3eb1c2d83b2168fa3fd3b06faf3e47df6076a2a
treeb857fdbde90922fa08ab614f6f8f0914d8db30f8
parent62646d98852b4bcdd773b9784c27ba75aedf3cda
ARM: 8364/1: fix BE32 module loading

The new veneer support for loadable modules on ARM uses the
__opcode_to_mem_thumb32() function to count R_ARM_THM_CALL
and R_ARM_THM_JUMP24 relocations.

However, this function is not defined for big-endian kernels
on ARMv5 or before, causing a compile-time error:

arch/arm/kernel/module-plts.c: In function 'count_plts':
arch/arm/kernel/module-plts.c:124:9: error: implicit declaration of function '__opcode_to_mem_thumb32' [-Werror=implicit-function-declaration]
         __opcode_to_mem_thumb32(0x07ff2fff)))
         ^

As we know that this part of the function is only needed for
Thumb2 kernels, and that those can never happen with BE32,
we can avoid the error by enclosing the code in an #ifdef.

Fixes: d42b313aa0a ("ARM: 8220/1: allow modules outside of bl range")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/module-plts.c