Skip to content

Commit 182ab1c

Browse files
authored
[Support] Adjust .note.GNU-stack guard in Support/BLAKE3/blake3_*_x86-64_unix.S (#76229)
When using GNU ld 2.41 on FreeBSD 14.0/amd64, there are linker warnings like ``` /vol/gcc/bin/gld-2.41: warning: blake3_avx512_x86-64_unix.S.o: missing .note.GNU-stack section implies executable stack /vol/gcc/bin/gld-2.41: NOTE: This behaviour is deprecated and will be removed in a future version of the linker ``` This can be fixed by adjusting the guard of the `.note.GNU-stack` sections in `blake3_*_x86-64_unix.S` to match `llvm/lib/MC/MCAsmInfoELF.cpp:MCAsmInfoELF::getNonexecutableStackSection` which emits the section on all ELF targets but Solaris. Tested on `amd64-pc-freebsd14.0`.
1 parent 5469010 commit 182ab1c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "llvm_blake3_prefix.h"
44

5-
#if defined(__ELF__) && defined(__linux__)
5+
#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__))
66
.section .note.GNU-stack,"",%progbits
77
#endif
88

llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "llvm_blake3_prefix.h"
44

5-
#if defined(__ELF__) && defined(__linux__)
5+
#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__))
66
.section .note.GNU-stack,"",%progbits
77
#endif
88

llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "llvm_blake3_prefix.h"
44

5-
#if defined(__ELF__) && defined(__linux__)
5+
#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__))
66
.section .note.GNU-stack,"",%progbits
77
#endif
88

llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "llvm_blake3_prefix.h"
44

5-
#if defined(__ELF__) && defined(__linux__)
5+
#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__))
66
.section .note.GNU-stack,"",%progbits
77
#endif
88

0 commit comments

Comments
 (0)