From 2e1f8090b0283a9cba4f4c9d961608ddd43ec640 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 2 Nov 2019 13:11:02 +0000 Subject: [PATCH] linker: riscv: discard .note.GNU-stack Similar to what was required for x86 in #12719 / PR#12752 Signed-off-by: Peter Robinson --- include/arch/riscv/common/linker.ld | 2 ++ 1 file changed, 2 insertions(+) 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))