diff --git a/include/arch/riscv/common/linker.ld b/include/arch/riscv/common/linker.ld index cff2b6bd521..a0edb0a0381 100644 --- a/include/arch/riscv/common/linker.ld +++ b/include/arch/riscv/common/linker.ld @@ -209,6 +209,8 @@ SECTIONS #include + /DISCARD/ : { *(.note.GNU-stack) } + SECTION_PROLOGUE(.riscv.attributes, 0,) { KEEP(*(.riscv.attributes))