Browse Source

fix(arm): add .note.GNU-stack to ARM assembly to prevent writable-stack warnings

Add .section .note.GNU-stack in ARM assembly epilogue on Linux/ELF targets to
avoid warnings about a writable/executable stack and ensure shared objects do
not require an executable stack.

Signed-off-by: minicx <minicx@disroot.org>
tags/v0.3.30
minicx 3 months ago
parent
commit
79b4dd0fb0
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      common_arm.h

+ 9
- 1
common_arm.h View File

@@ -114,7 +114,15 @@ static inline int blas_quickdivide(blasint x, blasint y){
OPENBLAS_ARM_TYPE_FUNCTION \ OPENBLAS_ARM_TYPE_FUNCTION \
REALNAME: REALNAME:


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

#define EPILOGUE \
GNUSTACK



#define PROFCODE #define PROFCODE




Loading…
Cancel
Save