aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2020-11-04 16:04:39 -0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-11-25 16:05:29 -0800
commitb5b11a8ac4b5a997a1b3ae388aea3879e26c857f (patch)
treee2550c7cfce7c6f43e994eeabc5504a22222a735
parentRISC-V: Protect all kernel sections including init early (diff)
downloadlinux-dev-b5b11a8ac4b5a997a1b3ae388aea3879e26c857f.tar.xz
linux-dev-b5b11a8ac4b5a997a1b3ae388aea3879e26c857f.zip
RISC-V: Move dynamic relocation section under __init
Dynamic relocation section are only required during boot. Those sections can be freed after init. Thus, it can be moved to __init section. Signed-off-by: Atish Patra <atish.patra@wdc.com> Tested-by: Greentime Hu <greentime.hu@sifive.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
-rw-r--r--arch/riscv/kernel/vmlinux.lds.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index ca19ee5acd0a..de03cb22d0e9 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -85,6 +85,10 @@ SECTIONS
}
PERCPU_SECTION(L1_CACHE_BYTES)
+ .rel.dyn : {
+ *(.rel.dyn*)
+ }
+
__init_data_end = .;
__init_end = .;
@@ -116,10 +120,6 @@ SECTIONS
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
- .rel.dyn : {
- *(.rel.dyn*)
- }
-
#ifdef CONFIG_EFI
. = ALIGN(PECOFF_SECTION_ALIGNMENT);
__pecoff_data_virt_size = ABSOLUTE(. - __pecoff_text_end);