]> www.infradead.org Git - users/dwmw2/linux.git/commit
riscv: vdso.lds.S: remove hardcoded 0x800 .text start addr
authorJisheng Zhang <jszhang@kernel.org>
Tue, 12 Sep 2023 07:20:15 +0000 (15:20 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sun, 5 Nov 2023 22:15:14 +0000 (14:15 -0800)
commit8f8c1ff879fab60f80f3a7aec3000f47e5b03ba9
treec44022bf9b87705a8a3cacd8a135d72ac400a38a
parent49cfbdc21faf5fffbdaa8fd31e1451a4432cfdaa
riscv: vdso.lds.S: remove hardcoded 0x800 .text start addr

I believe the hardcoded 0x800 and related comments come from the long
history VDSO_TEXT_OFFSET in x86 vdso code, but commit 5b9304933730
("x86 vDSO: generate vdso-syms.lds") and commit f6b46ebf904f ("x86
vDSO: new layout") removes the comment and hard coding for x86.

Similar as x86 and other arch, riscv doesn't need the rigid layout
using VDSO_TEXT_OFFSET since it "no longer matters to the kernel".
so we could remove the hard coding now, and removing it brings a
small vdso.so and aligns with other architectures.

Also, having enough separation between data and text is important for
I-cache, so similar as x86, move .note, .eh_frame_hdr, and .eh_frame
between .rodata and .text.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Tested-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Link: https://lore.kernel.org/r/20230912072015.2424-4-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/vdso/vdso.lds.S