From 246c8272cc1019075f5bb14a8281819e32eb1d52 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 5 Jun 2025 08:54:25 -0700 Subject: [PATCH] soc/openisa: Discard .note.GNU-stack sections while linking These sections are simple stack behavior annotations and are not needed in the final executable. Signed-off-by: Keith Packard --- soc/openisa/rv32m1/linker.ld | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soc/openisa/rv32m1/linker.ld b/soc/openisa/rv32m1/linker.ld index dbd19fcb805..26cb5b1e9cf 100644 --- a/soc/openisa/rv32m1/linker.ld +++ b/soc/openisa/rv32m1/linker.ld @@ -257,6 +257,8 @@ SECTIONS #include + /DISCARD/ : { *(.note.GNU-stack) } + SECTION_PROLOGUE(.riscv.attributes, 0,) { KEEP(*(.riscv.attributes))