liblzma: Use non-executable stack on FreeBSD as on Linux

This commit is contained in:
Ed Maste 2022-02-11 15:25:46 +00:00 committed by Lasse Collin
parent 068a6e3286
commit 748ef08338
2 changed files with 4 additions and 4 deletions

View File

@ -305,9 +305,9 @@ LZMA_CRC32:
/*
* This is needed to support non-executable stack. It's ugly to
* use __linux__ here, but I don't know a way to detect when
* use __FreeBSD__ and __linux__ here, but I don't know a way to detect when
* we are using GNU assembler.
*/
#if defined(__ELF__) && defined(__linux__)
#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__))
.section .note.GNU-stack,"",@progbits
#endif

View File

@ -288,9 +288,9 @@ LZMA_CRC64:
/*
* This is needed to support non-executable stack. It's ugly to
* use __linux__ here, but I don't know a way to detect when
* use __FreeBSD__ and __linux__ here, but I don't know a way to detect when
* we are using GNU assembler.
*/
#if defined(__ELF__) && defined(__linux__)
#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__))
.section .note.GNU-stack,"",@progbits
#endif