Skip to content

Commit f76dc9a

Browse files
ctmarinasAlex Shi
authored andcommitted
arm64: Only select ARM64_MODULE_PLTS if MODULES=y
Selecting CONFIG_RANDOMIZE_BASE=y and CONFIG_MODULES=n fails to build the module PLTs support: CC arch/arm64/kernel/module-plts.o /work/Linux/linux-2.6-aarch64/arch/arm64/kernel/module-plts.c: In function ‘module_emit_plt_entry’: /work/Linux/linux-2.6-aarch64/arch/arm64/kernel/module-plts.c:32:49: error: dereferencing pointer to incomplete type ‘struct module’ This patch selects ARM64_MODULE_PLTS conditionally only if MODULES is enabled. Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR") Cc: <stable@vger.kernel.org> # 4.6+ Reported-by: Jeff Vander Stoep <jeffv@google.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> (cherry picked from commit b9c220b589daaf140f5b8ebe502c98745b94e65c) Signed-off-by: Alex Shi <alex.shi@linaro.org>
1 parent 78732f2 commit f76dc9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm64/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ config RELOCATABLE
750750

751751
config RANDOMIZE_BASE
752752
bool "Randomize the address of the kernel image"
753-
select ARM64_MODULE_PLTS
753+
select ARM64_MODULE_PLTS if MODULES
754754
select RELOCATABLE
755755
help
756756
Randomizes the virtual address at which the kernel image is

0 commit comments

Comments
 (0)