util/blake3: Patch with hidden visibility for asm symbols.

For Unix platforms, the symbol visibility needs to be hidden to avoid
exposing them in driver shared objects.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22387>
This commit is contained in:
Tatsuyuki Ishi 2023-04-10 11:44:54 +09:00 committed by Marge Bot
parent 77826e8352
commit 0e30076d83
6 changed files with 37 additions and 1 deletions

View file

@ -11,4 +11,6 @@ Changes:
- Add non-typedef struct name to blake3_hasher.
- Add "static" to blake3_hash4_neon, to comply with -Werror=missing-prototypes.
- Add "static" to blake3_hash4_neon, to comply with -Werror=missing-prototypes.
- Add mesa_blake3_visibility.h and set symbol visibility to hidden for assembly sources.

View file

@ -1,3 +1,5 @@
#include "mesa_blake3_visibility.h"
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -13,6 +15,9 @@
#endif
.intel_syntax noprefix
HIDDEN _blake3_hash_many_avx2
HIDDEN blake3_hash_many_avx2
.global _blake3_hash_many_avx2
.global blake3_hash_many_avx2
#ifdef __APPLE__

View file

@ -1,3 +1,5 @@
#include "mesa_blake3_visibility.h"
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -13,6 +15,12 @@
#endif
.intel_syntax noprefix
HIDDEN _blake3_hash_many_avx512
HIDDEN blake3_hash_many_avx512
HIDDEN blake3_compress_in_place_avx512
HIDDEN _blake3_compress_in_place_avx512
HIDDEN blake3_compress_xof_avx512
HIDDEN _blake3_compress_xof_avx512
.global _blake3_hash_many_avx512
.global blake3_hash_many_avx512
.global blake3_compress_in_place_avx512

View file

@ -1,3 +1,5 @@
#include "mesa_blake3_visibility.h"
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -13,6 +15,12 @@
#endif
.intel_syntax noprefix
HIDDEN blake3_hash_many_sse2
HIDDEN _blake3_hash_many_sse2
HIDDEN blake3_compress_in_place_sse2
HIDDEN _blake3_compress_in_place_sse2
HIDDEN blake3_compress_xof_sse2
HIDDEN _blake3_compress_xof_sse2
.global blake3_hash_many_sse2
.global _blake3_hash_many_sse2
.global blake3_compress_in_place_sse2

View file

@ -1,3 +1,5 @@
#include "mesa_blake3_visibility.h"
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -13,6 +15,12 @@
#endif
.intel_syntax noprefix
HIDDEN blake3_hash_many_sse41
HIDDEN _blake3_hash_many_sse41
HIDDEN blake3_compress_in_place_sse41
HIDDEN _blake3_compress_in_place_sse41
HIDDEN blake3_compress_xof_sse41
HIDDEN _blake3_compress_xof_sse41
.global blake3_hash_many_sse41
.global _blake3_hash_many_sse41
.global blake3_compress_in_place_sse41

View file

@ -0,0 +1,5 @@
#ifdef __APPLE__
#define HIDDEN .private_extern
#else
#define HIDDEN .hidden
#endif