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 <keithp@keithp.com>
This commit is contained in:
Keith Packard 2025-06-05 08:54:25 -07:00 committed by Henrik Brix Andersen
commit 246c8272cc

View file

@ -257,6 +257,8 @@ SECTIONS
#include <zephyr/linker/debug-sections.ld>
/DISCARD/ : { *(.note.GNU-stack) }
SECTION_PROLOGUE(.riscv.attributes, 0,)
{
KEEP(*(.riscv.attributes))