summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/Makefile
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2014-11-24 16:54:35 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-05-08 10:42:34 +0100
commit7d485f647c1f4a6976264c90447fb0dbf07b111d (patch)
tree1ddeb6618cebf5b4a48ca225de772120b734e701 /arch/arm/kernel/Makefile
parente748994f5cc59e82ef28e31bae680f15fdadb26f (diff)
downloadlinux-7d485f647c1f4a6976264c90447fb0dbf07b111d.tar.gz
linux-7d485f647c1f4a6976264c90447fb0dbf07b111d.tar.bz2
linux-7d485f647c1f4a6976264c90447fb0dbf07b111d.zip
ARM: 8220/1: allow modules outside of bl range
Loading modules far away from the kernel in memory is problematic because the 'bl' instruction only has limited reach, and modules are not built with PLTs. Instead of using the -mlong-calls option (which affects all compiler emitted bl instructions, but not the ones in assembler), this patch allocates some additional space at module load time, and populates it with PLT like veneers when encountering relocations that are out of range. This should work with all relocations against symbols exported by the kernel, including those resulting from GCC generated implicit function calls for ftrace etc. The module memory size increases by about 5% on average, regardless of whether any PLT entries were actually needed. However, due to the page based rounding that occurs when allocating module memory, the average memory footprint increase is negligible. Reviewed-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/Makefile')
-rw-r--r--arch/arm/kernel/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 752725dcbf42..32c0990d1968 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_ISA_DMA_API) += dma.o
obj-$(CONFIG_FIQ) += fiq.o fiqasm.o
obj-$(CONFIG_MODULES) += armksyms.o module.o
+obj-$(CONFIG_ARM_MODULE_PLTS) += module-plts.o
obj-$(CONFIG_ISA_DMA) += dma-isa.o
obj-$(CONFIG_PCI) += bios32.o isa.o
obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o