[PATCH] D129587: [Support] Enable BLAKE3 .note.GNU-stack sections on FreeBSD

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 13:12:30 PDT 2022


dim created this revision.
dim added reviewers: akyrtzi, emaste, MaskRay, rnk.
Herald added subscribers: StephenFan, hiraditya, krytarowski, arichardson.
Herald added a project: All.
dim requested review of this revision.
Herald added a project: LLVM.

Several .S files for accelerating BLAKE3 have directives to add
.note.GNU-stack sections on Linux, to signal a non-executable stack.
Enable these for FreeBSD too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129587

Files:
  llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S
  llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S
  llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S
  llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S


Index: llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S
===================================================================
--- llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S
+++ llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S
@@ -1,6 +1,6 @@
 #if defined(__x86_64__)
 
-#if defined(__ELF__) && defined(__linux__)
+#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__))
 .section .note.GNU-stack,"",%progbits
 #endif
 
Index: llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S
===================================================================
--- llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S
+++ llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S
@@ -1,6 +1,6 @@
 #if defined(__x86_64__)
 
-#if defined(__ELF__) && defined(__linux__)
+#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__))
 .section .note.GNU-stack,"",%progbits
 #endif
 
Index: llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S
===================================================================
--- llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S
+++ llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S
@@ -1,6 +1,6 @@
 #if defined(__x86_64__)
 
-#if defined(__ELF__) && defined(__linux__)
+#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__))
 .section .note.GNU-stack,"",%progbits
 #endif
 
Index: llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S
===================================================================
--- llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S
+++ llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S
@@ -1,6 +1,6 @@
 #if defined(__x86_64__)
 
-#if defined(__ELF__) && defined(__linux__)
+#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__))
 .section .note.GNU-stack,"",%progbits
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129587.444059.patch
Type: text/x-patch
Size: 1765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220712/60d88dba/attachment.bin>


More information about the llvm-commits mailing list