summaryrefslogtreecommitdiff
path: root/arch/loongarch/kernel/Makefile
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2023-02-25 10:52:56 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2023-02-25 17:12:16 +0300
commitd8da19fbdedd5852592fbba18a7348e3f09500e6 (patch)
treea6a4a921da97d0b7379e9034532c8267a14b631e /arch/loongarch/kernel/Makefile
parent396233c650084cb957eb6d87dd4abd3e56a7d499 (diff)
downloadlinux-d8da19fbdedd5852592fbba18a7348e3f09500e6.tar.xz
LoongArch: Add support for kernel relocation
This config allows to compile kernel as PIE and to relocate it at any virtual address at runtime: this paves the way to KASLR. Runtime relocation is possible since relocation metadata are embedded into the kernel. Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Xi Ruoyao <xry111@xry111.site> # Use arch_initcall Signed-off-by: Jinyang He <hejinyang@loongson.cn> # Provide la_abs relocation code Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/Makefile')
-rw-r--r--arch/loongarch/kernel/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/loongarch/kernel/Makefile b/arch/loongarch/kernel/Makefile
index df5dbabfe7a6..94d33dbd4912 100644
--- a/arch/loongarch/kernel/Makefile
+++ b/arch/loongarch/kernel/Makefile
@@ -41,6 +41,8 @@ obj-$(CONFIG_NUMA) += numa.o
obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o
+obj-$(CONFIG_RELOCATABLE) += relocate.o
+
obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o