RISC-V: Move dynamic relocation section under __init
authorAtish Patra <atish.patra@wdc.com>
Thu, 5 Nov 2020 00:04:39 +0000 (16:04 -0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 26 Nov 2020 00:05:29 +0000 (16:05 -0800)
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>
arch/riscv/kernel/vmlinux.lds.S

index ca19ee5acd0a4cef74af67c516cbb9dd59a73cff..de03cb22d0e9534a065689946f75550c77fa4752 100644 (file)
@@ -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);