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>
This commit is contained in:
Zong Li 2018-03-15 16:50:41 +08:00 • committed by Palmer Dabbelt
commit ab1ef68e54
No known key found for this signature in database
GPG key ID: EF4CA1502CCBAB41
6 changed files with 260 additions and 0 deletions