Skip to content

Commit

Permalink
Mark asm code with no-executable-stack. (Snaipe#26)
Browse files Browse the repository at this point in the history
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 <clalancette@gmail.com>
  • Loading branch information
clalancette authored Aug 1, 2023
1 parent e300cc8 commit 6b08fa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/asm/trampoline-aarch64.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ ret_ctx:
.globl MANGLE(mmk_trampoline_end)
MANGLE(mmk_trampoline_end):
nop

.section .note.GNU-stack, "", @progbits
2 changes: 2 additions & 0 deletions src/asm/trampoline-x86_64-systemv.S
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@ ret_ctx: // Return context
.globl MANGLE(mmk_trampoline_end)
MANGLE(mmk_trampoline_end):
nop

.section .note.GNU-stack, "", @progbits

0 comments on commit 6b08fa3

Please sign in to comment.