We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9db6d95 commit b385083Copy full SHA for b385083
runtime/druntime/src/core/thread/fiber/switch_context_riscv.S
@@ -6,6 +6,18 @@
6
* Authors: Denis Feklushkin
7
*/
8
9
+#if (__linux__ || __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__) && __ELF__
10
+/*
11
+ * Mark the resulting object file as not requiring execution permissions on
12
+ * stack memory. The absence of this section would mark the whole resulting
13
+ * library as requiring an executable stack, making it impossible to
14
+ * dynamically load druntime on several Linux platforms where this is
15
+ * forbidden due to security policies.
16
+ */
17
+.section .note.GNU-stack,"",%progbits
18
+#endif
19
+
20
21
#if defined(__riscv)
22
23
// For save/load a register in memory, regardless of the size of machine register bit size
0 commit comments