Fold declarations for CRYPTOGAMS_armcaps

Also declare storage for CRYPTOGAMS_armcaps. This moves the symbol from BSS to initialized data. The Cryptogams module declares the symbol as common, so they are weak and use our declaration.
pull/853/head
Jeffrey Walton 2019-05-20 17:03:57 -04:00
parent 5c7c092336
commit b1b6ea5b78
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 5 additions and 3 deletions

View File

@ -59,6 +59,11 @@
# undef CRYPTOPP_SSE2_ASM_AVAILABLE # undef CRYPTOPP_SSE2_ASM_AVAILABLE
#endif #endif
#if CRYPTOGAMS_ARM_SHA1 || CRYPTOGAMS_ARM_SHA256 || CRYPTOGAMS_ARM_SHA512
extern "C" unsigned int CRYPTOGAMS_armcaps;
unsigned int CRYPTOGAMS_armcaps = 0;
#endif
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
#if CRYPTOPP_SHANI_AVAILABLE #if CRYPTOPP_SHANI_AVAILABLE
@ -67,7 +72,6 @@ extern void SHA256_HashMultipleBlocks_SHANI(word32 *state, const word32 *data, s
#endif #endif
#if CRYPTOGAMS_ARM_SHA1 #if CRYPTOGAMS_ARM_SHA1
extern "C" unsigned int CRYPTOGAMS_armcaps;
extern "C" int sha1_block_data_order(word32* state, const word32 *data, size_t blocks); extern "C" int sha1_block_data_order(word32* state, const word32 *data, size_t blocks);
#endif #endif
@ -80,7 +84,6 @@ extern void SHA256_HashMultipleBlocks_ARMV8(word32 *state, const word32 *data, s
#endif #endif
#if CRYPTOGAMS_ARM_SHA256 #if CRYPTOGAMS_ARM_SHA256
extern "C" unsigned int CRYPTOGAMS_armcaps;
extern "C" int sha256_block_data_order(word32* state, const word32 *data, size_t blocks); extern "C" int sha256_block_data_order(word32* state, const word32 *data, size_t blocks);
#endif #endif
@ -94,7 +97,6 @@ extern void SHA512_HashMultipleBlocks_POWER8(word64 *state, const word64 *data,
#endif #endif
#if CRYPTOGAMS_ARM_SHA512 #if CRYPTOGAMS_ARM_SHA512
extern "C" unsigned int CRYPTOGAMS_armcaps;
extern "C" int sha512_block_data_order(word64* state, const word64 *data, size_t blocks); extern "C" int sha512_block_data_order(word64* state, const word64 *data, size_t blocks);
#endif #endif