Skip to content

“missing .note.GNU-stack section implies executable stack” when building OpenBLAS #5313

Discussion options

You must be logged in to vote

@martin-frbg
As was said this helps:

diff --git a/common_arm.h b/common_arm.h
index d6291018b..6efb20c58 100644
--- a/common_arm.h
+++ b/common_arm.h
@@ -114,7 +114,15 @@ static inline int blas_quickdivide(blasint x, blasint y){
	OPENBLAS_ARM_TYPE_FUNCTION \
REALNAME:

-#define EPILOGUE
+#if defined(__ELF__) && defined(__linux__)
+# define GNUSTACK .section        .note.GNU-stack,"",%progbits
+#else
+# define GNUSTACK
+#endif
+
+#define EPILOGUE \
+        .size    REALNAME, .-REALNAME;	\
+        GNUSTACK

#define PROFCODE

diff --git a/common_arm64.h b/common_arm64.h
index 5856898a2..7fd81acc4 100644
--- a/common_arm64.h
+++ b/common_arm64.h
@@ -159,8 +159,15 @@ static inline int blas_q…

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@loss-and-quick
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by loss-and-quick
Comment options

You must be logged in to vote
9 replies
@loss-and-quick
Comment options

@martin-frbg
Comment options

@loss-and-quick
Comment options

@martin-frbg
Comment options

@loss-and-quick
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants