ruby-changes:65391
From: David <ko1@a...>
Date: Fri, 5 Mar 2021 10:34:07 +0900 (JST)
Subject: [ruby-changes:65391] 0ead818d81 (master): Generating note.GNU-stack section for FreeBSD on x86.
https://git.ruby-lang.org/ruby.git/commit/?id=0ead818d81 From 0ead818d81c975275238878c81f300dd404e0722 Mon Sep 17 00:00:00 2001 From: David Carlier <devnexen@g...> Date: Thu, 4 Mar 2021 22:12:58 +0000 Subject: Generating note.GNU-stack section for FreeBSD on x86. Not enabling for ELF in general as not all platform support it (e.g. NetBSD, implictly stack never executable). --- coroutine/amd64/Context.S | 2 +- coroutine/x86/Context.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coroutine/amd64/Context.S b/coroutine/amd64/Context.S index 051db1c..d50732a 100644 --- a/coroutine/amd64/Context.S +++ b/coroutine/amd64/Context.S @@ -41,6 +41,6 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): https://github.com/ruby/ruby/blob/trunk/coroutine/amd64/Context.S#L41 # We pop the return address and jump to it ret -#if defined(__linux__) && defined(__ELF__) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) .section .note.GNU-stack,"",%progbits #endif diff --git a/coroutine/x86/Context.S b/coroutine/x86/Context.S index 6983f21..f06a417 100644 --- a/coroutine/x86/Context.S +++ b/coroutine/x86/Context.S @@ -37,6 +37,6 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): https://github.com/ruby/ruby/blob/trunk/coroutine/x86/Context.S#L37 # Jump to the address on the stack ret -#if defined(__linux__) && defined(__ELF__) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) .section .note.GNU-stack,"",%progbits #endif -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/