]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: Add sections of PLT and GOT for kernel module
authorZong Li <zong@andestech.com>
Thu, 15 Mar 2018 08:50:41 +0000 (16:50 +0800)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 3 Apr 2018 03:00:54 +0000 (20:00 -0700)
commit9dc0b36b2828b3a53358b6acf3dc42f4e398848d
tree15fd30ddaaf18d61caf77f8748e291f3802987b5
parent17a125099a8c4e05d364eab41cd2bb30ef1cd67c
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>
arch/riscv/Kconfig
arch/riscv/Makefile
arch/riscv/include/asm/module.h [new file with mode: 0644]
arch/riscv/kernel/Makefile
arch/riscv/kernel/module-sections.c [new file with mode: 0644]
arch/riscv/kernel/module.lds [new file with mode: 0644]