Skip to content

Commit 1546599

Browse files
authored
Merge pull request #5315 from loss-and-quick/arm-exec-stack
Add .note.GNU-stack in ARM epilogue to avoid writable stack
2 parents c2342fc + 79b4dd0 commit 1546599

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

common_arm.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,15 @@ static inline int blas_quickdivide(blasint x, blasint y){
114114
OPENBLAS_ARM_TYPE_FUNCTION \
115115
REALNAME:
116116

117-
#define EPILOGUE
117+
#if defined(__ELF__) && defined(__linux__)
118+
# define GNUSTACK .section .note.GNU-stack,"",%progbits
119+
#else
120+
# define GNUSTACK
121+
#endif
122+
123+
#define EPILOGUE \
124+
GNUSTACK
125+
118126

119127
#define PROFCODE
120128

0 commit comments

Comments
 (0)