Fix linker marking entire executable as executable stack

See: https://wiki.ubuntu.com/SecurityTeam/Roadmap/ExecutableStacks
See: https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
This commit is contained in:
Matt Smith 2019-08-29 14:12:43 +01:00
parent 76fdc4fc4b
commit df973763bb
No known key found for this signature in database
GPG key ID: FA6FD19C15344A6D
4 changed files with 16 additions and 0 deletions

View file

@ -1593,3 +1593,7 @@ FN_PREFIX(CryptonightR_instruction_mov254):
FN_PREFIX(CryptonightR_instruction_mov255): FN_PREFIX(CryptonightR_instruction_mov255):
FN_PREFIX(CryptonightR_instruction_mov256): FN_PREFIX(CryptonightR_instruction_mov256):
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif

View file

@ -71,3 +71,7 @@ FN_PREFIX(cnv2_rwz_double_mainloop_asm):
add rsp, 48 add rsp, 48
ret 0 ret 0
mov eax, 3735929054 mov eax, 3735929054
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif

View file

@ -43,3 +43,7 @@ cnv2_rwz_double_mainloop_asm:
#include "cn2/cnv2_rwz_double_main_loop.inc" #include "cn2/cnv2_rwz_double_main_loop.inc"
ret 0 ret 0
mov eax, 3735929054 mov eax, 3735929054
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif

View file

@ -206,3 +206,7 @@ DECL(randomx_reciprocal_fast):
mov rcx, rdi mov rcx, rdi
#endif #endif
#include "asm/randomx_reciprocal.inc" #include "asm/randomx_reciprocal.inc"
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif