From be85db4de43fdc3f371d39829a1935e7f55103eb Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 28 Dec 2018 18:05:06 -0500 Subject: [PATCH] Restore unnamed namespace for SHA512_HashBlock_SSE2 (GH #684) --- sha.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sha.cpp b/sha.cpp index aa54af20..87cf749a 100644 --- a/sha.cpp +++ b/sha.cpp @@ -956,15 +956,16 @@ void SHA512::InitState(HashWordType *state) #if CRYPTOPP_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86) -// Anonymous namespace removed due to a new compile error. +ANONYMOUS_NAMESPACE_BEGIN + +// No inlining due to https://github.com/weidai11/cryptopp/issues/684 // g++ -DNDEBUG -g2 -O3 -pthread -pipe -c sha.cpp // sha.cpp: Assembler messages: // sha.cpp:1155: Error: symbol `SHA512_Round' is already defined // sha.cpp:1155: Error: symbol `SHA512_Round' is already defined -// ANONYMOUS_NAMESPACE_BEGIN - -CRYPTOPP_NAKED void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const word64 *data) +CRYPTOPP_NOINLINE CRYPTOPP_NAKED +void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const word64 *data) { #ifdef __GNUC__ __asm__ __volatile__ @@ -1150,7 +1151,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const #endif } -// ANONYMOUS_NAMESPACE_END +ANONYMOUS_NAMESPACE_END #endif // CRYPTOPP_SSE2_ASM_AVAILABLE