diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-05-20 17:03:57 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-05-20 17:03:57 -0400 |
commit | b1b6ea5b78c2e38cf43c3fb4a4531625d7352df0 (patch) | |
tree | 37da5cf1a0c9167e7ba1fa5e835e8df8ffe7b066 /sha.cpp | |
parent | 5c7c09233640de1ba29941ac67f2b6df8c4c6c17 (diff) | |
download | cryptopp-git-b1b6ea5b78c2e38cf43c3fb4a4531625d7352df0.tar.gz |
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.
Diffstat (limited to 'sha.cpp')
-rw-r--r-- | sha.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -59,6 +59,11 @@ # undef CRYPTOPP_SSE2_ASM_AVAILABLE
#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)
#if CRYPTOPP_SHANI_AVAILABLE
@@ -67,7 +72,6 @@ extern void SHA256_HashMultipleBlocks_SHANI(word32 *state, const word32 *data, s #endif
#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);
#endif
@@ -80,7 +84,6 @@ extern void SHA256_HashMultipleBlocks_ARMV8(word32 *state, const word32 *data, s #endif
#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);
#endif
@@ -94,7 +97,6 @@ extern void SHA512_HashMultipleBlocks_POWER8(word64 *state, const word64 *data, #endif
#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);
#endif
|