diff options
author | Hans-Peter Jansen <hpj@urpla.net> | 2019-10-02 21:25:10 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-10-02 21:25:10 +0200 |
commit | 0d91dab5b989f7d184c43b9468d17d5c5c0a756d (patch) | |
tree | 32731a855e8d9c45060895c44f7759a63181656a /src | |
parent | e211749c7cb4bc53cf08bf5ffd8735ee633b4606 (diff) | |
download | VeraCrypt-0d91dab5b989f7d184c43b9468d17d5c5c0a756d.tar.gz VeraCrypt-0d91dab5b989f7d184c43b9468d17d5c5c0a756d.zip |
Align section types of Whirlpool_C and SHA256_K (#479)
in order to fix LTO linking.
After switching to LTO for openSUSE Tumbleweed, veracrypt build failed with:
[ 185s] ../Crypto/Whirlpool.c:105:45: error: 'Whirlpool_C' causes a section type conflict with 'SHA256_K'
[ 185s] 105 | CRYPTOPP_ALIGN_DATA(16) static const uint64 Whirlpool_C[8*256+R] CRYPTOPP_SECTION_ALIGN16 = {
[ 185s] | ^
[ 185s] ../Crypto/Sha2.c:321:34: note: 'SHA256_K' was declared here
[ 185s] 321 | CRYPTOPP_ALIGN_DATA(16) uint_32t SHA256_K[64] CRYPTOPP_SECTION_ALIGN16 = {
[ 185s] | ^
[ 185s] lto-wrapper: fatal error: g++ returned 1 exit status
Aligning section types of Whirlpool_C and SHA256_K fixes this.
Diffstat (limited to 'src')
-rw-r--r-- | src/Crypto/Sha2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Crypto/Sha2.c b/src/Crypto/Sha2.c index 505ebb05..f214f6dd 100644 --- a/src/Crypto/Sha2.c +++ b/src/Crypto/Sha2.c @@ -318,7 +318,7 @@ extern "C" #endif -CRYPTOPP_ALIGN_DATA(16) uint_32t SHA256_K[64] CRYPTOPP_SECTION_ALIGN16 = { +CRYPTOPP_ALIGN_DATA(16) static const uint_32t SHA256_K[64] CRYPTOPP_SECTION_ALIGN16 = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, |