soc/esp32c6: 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 d44f8065da

View file

@ -121,6 +121,9 @@ SECTIONS
__stack_top = ORIGIN(ram) + LENGTH(ram);
#include <zephyr/linker/debug-sections.ld>
/DISCARD/ : { *(.note.GNU-stack) }
SECTION_PROLOGUE(.riscv.attributes, 0,)
{
KEEP(*(.riscv.attributes))