aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/Makefile
diff options
context:
space:
mode:
authorZong Li <zong@andestech.com>2018-03-15 16:50:41 +0800
committerPalmer Dabbelt <palmer@sifive.com>2018-04-02 20:00:54 -0700
commitab1ef68e54019937cf859f2c86c9ead6f3e62f19 (patch)
tree15fd30ddaaf18d61caf77f8748e291f3802987b5 /arch/riscv/kernel/Makefile
parentLinux 4.16 (diff)
downloadlinux-dev-ab1ef68e54019937cf859f2c86c9ead6f3e62f19.tar.xz
linux-dev-ab1ef68e54019937cf859f2c86c9ead6f3e62f19.zip
RISC-V: Add sections of PLT and GOT for kernel module
The address of external symbols will locate more than 32-bit offset in 64-bit kernel with sv39 or sv48 virtual addressing. Module loader emits the GOT and PLT entries for data symbols and function symbols respectively. The PLT entry is a trampoline code for jumping to the 64-bit real address. The GOT entry is just the data symbol address. Signed-off-by: Zong Li <zong@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/kernel/Makefile')
-rw-r--r--arch/riscv/kernel/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index 196f62ffc428..d355e3c18278 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -34,6 +34,7 @@ CFLAGS_setup.o := -mcmodel=medany
obj-$(CONFIG_SMP) += smpboot.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_MODULES) += module.o
+obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o
obj-$(CONFIG_FUNCTION_TRACER) += mcount.o
obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o