diff --git a/src/util/blake3/README b/src/util/blake3/README index 24fe84dd341..02922dc0f49 100644 --- a/src/util/blake3/README +++ b/src/util/blake3/README @@ -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. \ No newline at end of file +- 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. \ No newline at end of file diff --git a/src/util/blake3/blake3_avx2_x86-64_unix.S b/src/util/blake3/blake3_avx2_x86-64_unix.S index 812bb856829..89b231072b0 100644 --- a/src/util/blake3/blake3_avx2_x86-64_unix.S +++ b/src/util/blake3/blake3_avx2_x86-64_unix.S @@ -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__ diff --git a/src/util/blake3/blake3_avx512_x86-64_unix.S b/src/util/blake3/blake3_avx512_x86-64_unix.S index a06aede0f1a..c948483ea60 100644 --- a/src/util/blake3/blake3_avx512_x86-64_unix.S +++ b/src/util/blake3/blake3_avx512_x86-64_unix.S @@ -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 diff --git a/src/util/blake3/blake3_sse2_x86-64_unix.S b/src/util/blake3/blake3_sse2_x86-64_unix.S index 99f033fefb4..078eb23f8aa 100644 --- a/src/util/blake3/blake3_sse2_x86-64_unix.S +++ b/src/util/blake3/blake3_sse2_x86-64_unix.S @@ -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 diff --git a/src/util/blake3/blake3_sse41_x86-64_unix.S b/src/util/blake3/blake3_sse41_x86-64_unix.S index a3ff64269ca..7644ebfb9f1 100644 --- a/src/util/blake3/blake3_sse41_x86-64_unix.S +++ b/src/util/blake3/blake3_sse41_x86-64_unix.S @@ -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 diff --git a/src/util/blake3/mesa_blake3_visibility.h b/src/util/blake3/mesa_blake3_visibility.h new file mode 100644 index 00000000000..a7596914f8b --- /dev/null +++ b/src/util/blake3/mesa_blake3_visibility.h @@ -0,0 +1,5 @@ +#ifdef __APPLE__ +#define HIDDEN .private_extern +#else +#define HIDDEN .hidden +#endif \ No newline at end of file