From e37e3f17e5bc4ee9f63ff45c8782dbec29eccc6b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 6 May 2025 13:44:44 +0100 Subject: [PATCH] [riscv] Discard ELF hash tables The ELF hash table is generated when building a position-independent executable even though it is not required (since we have no dynamic linker). Explicitly discard these unneeded sections. Signed-off-by: Michael Brown --- src/arch/riscv/scripts/sbi.lds | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arch/riscv/scripts/sbi.lds b/src/arch/riscv/scripts/sbi.lds index f882f235e..39ca002e7 100644 --- a/src/arch/riscv/scripts/sbi.lds +++ b/src/arch/riscv/scripts/sbi.lds @@ -117,6 +117,8 @@ SECTIONS { *(.dynamic) *(.dynsym) *(.dynstr) + *(.hash) + *(.gnu.hash) *(.einfo) *(.einfo.*) *(.discard)