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 <[email protected]>
---
 arch/riscv/kernel/vmlinux.lds.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 15b9882588ae..4aedb4fd79e5 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -60,6 +60,10 @@ SECTIONS
        }
        PERCPU_SECTION(L1_CACHE_BYTES)
 
+       .rel.dyn : {
+               *(.rel.dyn*)
+       }
+
        __init_data_end = .;
        __init_end = .;
 
@@ -112,10 +116,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);
-- 
2.25.1

Reply via email to