[all-commits] [llvm/llvm-project] 182ab1: [Support] Adjust .note.GNU-stack guard in Support/...

Rainer Orth via All-commits all-commits at lists.llvm.org
Wed Jan 24 05:33:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 182ab1c7034b951433fb8831b67e7758fe61d4e8
      https://github.com/llvm/llvm-project/commit/182ab1c7034b951433fb8831b67e7758fe61d4e8
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
    M llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S
    M llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S
    M llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S
    M llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S

  Log Message:
  -----------
  [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`.




More information about the All-commits mailing list