From 6b08fa3fb91e490a8131903e4ea2480019854698 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Tue, 1 Aug 2023 08:48:46 -0400 Subject: [PATCH] Mark asm code with no-executable-stack. (#26) Newer versions of binutils (2.39 and above) complain if you have assembly without explicitly marking that it is not using an executable stack (see https://www.redhat.com/en/blog/linkers-warnings-about-executable-stacks-and-segments for more details). Mark it here to quiet that warning. Signed-off-by: Chris Lalancette --- src/asm/trampoline-aarch64.S | 2 ++ src/asm/trampoline-x86_64-systemv.S | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/asm/trampoline-aarch64.S b/src/asm/trampoline-aarch64.S index cf8aff9..b410e70 100644 --- a/src/asm/trampoline-aarch64.S +++ b/src/asm/trampoline-aarch64.S @@ -76,3 +76,5 @@ ret_ctx: .globl MANGLE(mmk_trampoline_end) MANGLE(mmk_trampoline_end): nop + +.section .note.GNU-stack, "", @progbits diff --git a/src/asm/trampoline-x86_64-systemv.S b/src/asm/trampoline-x86_64-systemv.S index 56f0efd..8f29468 100644 --- a/src/asm/trampoline-x86_64-systemv.S +++ b/src/asm/trampoline-x86_64-systemv.S @@ -103,3 +103,5 @@ ret_ctx: // Return context .globl MANGLE(mmk_trampoline_end) MANGLE(mmk_trampoline_end): nop + +.section .note.GNU-stack, "", @progbits