Skip to content

Commit 381b50a

Browse files
committed
[druntime]: Unconditionally add .note.GNU-stack in assembly files
Signed-off-by: Andrei Horodniceanu <[email protected]>
1 parent 0c5275f commit 381b50a

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

runtime/druntime/src/core/thread/fiber/switch_context_asm.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* http://www.boost.org/LICENSE_1_0.txt)
1414
*/
1515

16-
#if (__linux__ || __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__) && __ELF__
1716
/*
1817
* Mark the resulting object file as not requiring execution permissions on
1918
* stack memory. The absence of this section would mark the whole resulting
@@ -22,7 +21,6 @@
2221
* due to security policies.
2322
*/
2423
.section .note.GNU-stack,"",%progbits
25-
#endif
2624

2725
/* Let preprocessor tell us if C symbols have a prefix: __USER_LABEL_PREFIX__ */
2826
#ifdef __USER_LABEL_PREFIX__

runtime/druntime/src/core/thread/fiber/switch_context_riscv.S

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* Authors: Denis Feklushkin
77
*/
88

9-
#if (__linux__ || __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__) && __ELF__
109
/*
1110
* Mark the resulting object file as not requiring execution permissions on
1211
* stack memory. The absence of this section would mark the whole resulting
@@ -15,8 +14,6 @@
1514
* due to security policies.
1615
*/
1716
.section .note.GNU-stack,"",%progbits
18-
#endif
19-
2017

2118
#if defined(__riscv)
2219

runtime/druntime/src/ldc/eh_asm.S

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
* making it impossible to dynamically load druntime on several
1414
* platforms where this is forbidden due to security policies.
1515
*/
16-
17-
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
1816
.section .note.GNU-stack,"",%progbits
1917
.previous
20-
#endif
2118

2219
/*
2320
* Called by our compiler-generate code to resume unwinding after a

0 commit comments

Comments
 (0)