summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/module.lds
diff options
context:
space:
mode:
authorZong Li <zong@andestech.com>2018-03-15 09:50:42 +0100
committerPalmer Dabbelt <palmer@sifive.com>2018-04-03 05:00:54 +0200
commitb8bde0ef12bd43f013d879973a1900930bfb95ee (patch)
tree953afd76c9ed57a34ed2ee3c042c4e061bc9d5dc /arch/riscv/kernel/module.lds
parentRISC-V: Add sections of PLT and GOT for kernel module (diff)
downloadlinux-b8bde0ef12bd43f013d879973a1900930bfb95ee.tar.xz
linux-b8bde0ef12bd43f013d879973a1900930bfb95ee.zip
RISC-V: Add section of GOT.PLT for kernel module
Separate the function symbol address from .plt to .got.plt section. The original plt entry has trampoline code with symbol address, there is a 32-bit padding bwtween jar instruction and symbol address. Extract the symbol address to .got.plt to reduce the module size. Signed-off-by: Zong Li <zong@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to '')
-rw-r--r--arch/riscv/kernel/module.lds1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/kernel/module.lds b/arch/riscv/kernel/module.lds
index 7ef580e62883..295ecfb341a2 100644
--- a/arch/riscv/kernel/module.lds
+++ b/arch/riscv/kernel/module.lds
@@ -4,4 +4,5 @@
SECTIONS {
.plt (NOLOAD) : { BYTE(0) }
.got (NOLOAD) : { BYTE(0) }
+ .got.plt (NOLOAD) : { BYTE(0) }
}