* [PATCH -fixes] riscv: Move .rela.dyn to the init sections
@ 2023-04-28 12:09 Alexandre Ghiti
2023-05-02 0:19 ` Palmer Dabbelt
2023-05-08 14:41 ` patchwork-bot+linux-riscv
0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Ghiti @ 2023-04-28 12:09 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
linux-riscv, linux-kernel
The recent introduction of relocatable kernels prepared the move of
.rela.dyn to the init section, but actually forgot to do so, so do it
here.
Before this patch: "Freeing unused kernel image (initmem) memory: 2592K"
After this patch: "Freeing unused kernel image (initmem) memory: 6288K"
The difference corresponds to the size of the .rela.dyn section:
"[42] .rela.dyn RELA ffffffff8197e798 0127f798
000000000039c660 0000000000000018 A 47 0 8"
Fixes: 559d1e45a16d ("riscv: Use --emit-relocs in order to move .rela.dyn in init")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
arch/riscv/kernel/vmlinux.lds.S | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 305877d85e96..f03b5697f8e0 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -104,6 +104,12 @@ SECTIONS
*(.rel.dyn*)
}
+ .rela.dyn : ALIGN(8) {
+ __rela_dyn_start = .;
+ *(.rela .rela*)
+ __rela_dyn_end = .;
+ }
+
__init_data_end = .;
. = ALIGN(8);
@@ -130,12 +136,6 @@ SECTIONS
*(.sdata*)
}
- .rela.dyn : ALIGN(8) {
- __rela_dyn_start = .;
- *(.rela .rela*)
- __rela_dyn_end = .;
- }
-
.got : { *(.got*) }
#ifdef CONFIG_RELOCATABLE
--
2.37.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -fixes] riscv: Move .rela.dyn to the init sections
2023-04-28 12:09 [PATCH -fixes] riscv: Move .rela.dyn to the init sections Alexandre Ghiti
@ 2023-05-02 0:19 ` Palmer Dabbelt
2023-05-08 14:41 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2023-05-02 0:19 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv,
linux-kernel, Alexandre Ghiti
On Fri, 28 Apr 2023 14:09:32 +0200, Alexandre Ghiti wrote:
> The recent introduction of relocatable kernels prepared the move of
> .rela.dyn to the init section, but actually forgot to do so, so do it
> here.
>
> Before this patch: "Freeing unused kernel image (initmem) memory: 2592K"
> After this patch: "Freeing unused kernel image (initmem) memory: 6288K"
>
> [...]
Applied, thanks!
[1/1] riscv: Move .rela.dyn to the init sections
https://git.kernel.org/palmer/c/4db9e253e701
Best regards,
--
Palmer Dabbelt <palmer@rivosinc.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -fixes] riscv: Move .rela.dyn to the init sections
2023-04-28 12:09 [PATCH -fixes] riscv: Move .rela.dyn to the init sections Alexandre Ghiti
2023-05-02 0:19 ` Palmer Dabbelt
@ 2023-05-08 14:41 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-05-08 14:41 UTC (permalink / raw)
To: Alexandre Ghiti; +Cc: linux-riscv, paul.walmsley, palmer, aou, linux-kernel
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Fri, 28 Apr 2023 14:09:32 +0200 you wrote:
> The recent introduction of relocatable kernels prepared the move of
> .rela.dyn to the init section, but actually forgot to do so, so do it
> here.
>
> Before this patch: "Freeing unused kernel image (initmem) memory: 2592K"
> After this patch: "Freeing unused kernel image (initmem) memory: 6288K"
>
> [...]
Here is the summary with links:
- [-fixes] riscv: Move .rela.dyn to the init sections
https://git.kernel.org/riscv/c/4db9e253e701
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-08 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28 12:09 [PATCH -fixes] riscv: Move .rela.dyn to the init sections Alexandre Ghiti
2023-05-02 0:19 ` Palmer Dabbelt
2023-05-08 14:41 ` patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox