From c8de423ab5a1eda7c6b5bd36aa323f1996486547 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 6 Feb 2016 22:19:53 -0500 Subject: [PATCH] Fix missing CryptoPP::rdtable::Te symbol for Microsoft SSE2 non-AESNI X64 platforms when CRYPTOPP_NO_UNALIGNED_DATA_ACCESS defined --- rijndael.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rijndael.cpp b/rijndael.cpp index e60822a7..249fdf4a 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -85,9 +85,15 @@ using namespace rdtable; static word64 Te[256]; # endif static word64 Td[256]; -#else -static word32 Te[256*4], Td[256*4]; -#endif +#else // Not CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS +# if defined(CRYPTOPP_X64_MASM_AVAILABLE) +// Unused; avoids linker error on Microsoft X64 non-AESNI platforms +namespace rdtable {CRYPTOPP_ALIGN_DATA(16) word64 Te[256+2];} +# endif +static CRYPTOPP_ALIGN_DATA(16) word32 Te[256*4]; +static CRYPTOPP_ALIGN_DATA(16) word32 Td[256*4]; +#endif // CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS + static volatile bool s_TeFilled = false, s_TdFilled = false; // ************************* Portable Code ************************************