VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-26 14:53:12 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-26 22:55:22 (GMT)
commit3d8260d3d3243ff5747b846cde296642156f51b0 (patch)
treec12fe1bfa0c8619a3dbdafbc3fd1d7411b30c0ae /src/Crypto
parente8bafa6a378852977326c060c505b6487232664b (diff)
downloadVeraCrypt-3d8260d3d3243ff5747b846cde296642156f51b0.zip
VeraCrypt-3d8260d3d3243ff5747b846cde296642156f51b0.tar.gz
MacOSX: various changes for assembly files build. Don't use 32-bit assembly code of SHA-512 since it is not compatible with PIE configuration of OSX compiler (absolute addressing used)
Diffstat (limited to 'src/Crypto')
-rw-r--r--src/Crypto/Camellia_aesni_x64.S2
-rw-r--r--src/Crypto/Camellia_aesni_x86.S2
-rw-r--r--src/Crypto/Camellia_x64.S2
-rw-r--r--src/Crypto/Camellia_x86.S2
-rw-r--r--src/Crypto/Sha2.c6
-rw-r--r--src/Crypto/Twofish_x64.S2
-rw-r--r--src/Crypto/Twofish_x86.S14
-rw-r--r--src/Crypto/sha256-x64-nayuki.S4
-rw-r--r--src/Crypto/sha256-x86-nayuki.S4
-rw-r--r--src/Crypto/sha512-x64-nayuki.S4
-rw-r--r--src/Crypto/sha512-x86-nayuki.S2
11 files changed, 19 insertions, 25 deletions
diff --git a/src/Crypto/Camellia_aesni_x64.S b/src/Crypto/Camellia_aesni_x64.S
index 4e2e093..c3b8d19 100644
--- a/src/Crypto/Camellia_aesni_x64.S
+++ b/src/Crypto/Camellia_aesni_x64.S
@@ -833,7 +833,7 @@ _camellia_setup256:
ret;
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/src/Crypto/Camellia_aesni_x86.S b/src/Crypto/Camellia_aesni_x86.S
index 4a46688..0b1721e 100644
--- a/src/Crypto/Camellia_aesni_x86.S
+++ b/src/Crypto/Camellia_aesni_x86.S
@@ -1,4 +1,4 @@
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/src/Crypto/Camellia_x64.S b/src/Crypto/Camellia_x64.S
index d57e5a4..d1b8fb2 100644
--- a/src/Crypto/Camellia_x64.S
+++ b/src/Crypto/Camellia_x64.S
@@ -331,7 +331,7 @@ popq %rsi
ret;
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/src/Crypto/Camellia_x86.S b/src/Crypto/Camellia_x86.S
index 4a46688..0b1721e 100644
--- a/src/Crypto/Camellia_x86.S
+++ b/src/Crypto/Camellia_x86.S
@@ -1,4 +1,4 @@
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/src/Crypto/Sha2.c b/src/Crypto/Sha2.c
index d383a3e..fc1d0ae 100644
--- a/src/Crypto/Sha2.c
+++ b/src/Crypto/Sha2.c
@@ -26,7 +26,7 @@ extern "C"
void sha512_avx(const void* M, void* D, uint_64t l);
#endif
-#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
+#if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX))
void sha512_compress_nayuki(uint_64t state[8], const uint_8t block[128]);
#endif
#if defined(__cplusplus)
@@ -173,7 +173,7 @@ void SSE4Transform(sha512_ctx* ctx, void* mp, uint_64t num_blks)
}
#endif
-#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
+#if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX))
void SSE2Transform(sha512_ctx* ctx, void* mp, uint_64t num_blks)
{
@@ -216,7 +216,7 @@ void sha512_begin(sha512_ctx* ctx)
else
#endif
-#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
+#if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX))
if (HasSSE2() && HasMMX())
transfunc = SSE2Transform;
else
diff --git a/src/Crypto/Twofish_x64.S b/src/Crypto/Twofish_x64.S
index e5fa5ea..93f2820 100644
--- a/src/Crypto/Twofish_x64.S
+++ b/src/Crypto/Twofish_x64.S
@@ -312,7 +312,7 @@ movq %r8, %rdx;
.endif
ret;
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/src/Crypto/Twofish_x86.S b/src/Crypto/Twofish_x86.S
index d4af8ce..46f0e98 100644
--- a/src/Crypto/Twofish_x86.S
+++ b/src/Crypto/Twofish_x86.S
@@ -1,11 +1,5 @@
- .ifndef WINABI
-%ifidn __OUTPUT_FORMAT__,elf
-section .note.GNU-stack noalloc noexec nowrite progbits
-%endif
-%ifidn __OUTPUT_FORMAT__,elf32
-section .note.GNU-stack noalloc noexec nowrite progbits
-%endif
-%ifidn __OUTPUT_FORMAT__,elf64
-section .note.GNU-stack noalloc noexec nowrite progbits
-%endif
+ .ifndef __YASM__
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
.endif \ No newline at end of file
diff --git a/src/Crypto/sha256-x64-nayuki.S b/src/Crypto/sha256-x64-nayuki.S
index c6dd16d..444b28c 100644
--- a/src/Crypto/sha256-x64-nayuki.S
+++ b/src/Crypto/sha256-x64-nayuki.S
@@ -1,6 +1,6 @@
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
- .section .note.GNU-stack,"",%progbits
+.section .note.GNU-stack,"",%progbits
#endif
.endif \ No newline at end of file
diff --git a/src/Crypto/sha256-x86-nayuki.S b/src/Crypto/sha256-x86-nayuki.S
index a8e25db..067496b 100644
--- a/src/Crypto/sha256-x86-nayuki.S
+++ b/src/Crypto/sha256-x86-nayuki.S
@@ -161,8 +161,8 @@
retl
.endif
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
- .section .note.GNU-stack,"",%progbits
+.section .note.GNU-stack,"",%progbits
#endif
.endif \ No newline at end of file
diff --git a/src/Crypto/sha512-x64-nayuki.S b/src/Crypto/sha512-x64-nayuki.S
index 0e36ac9..167b31f 100644
--- a/src/Crypto/sha512-x64-nayuki.S
+++ b/src/Crypto/sha512-x64-nayuki.S
@@ -195,8 +195,8 @@ _sha512_compress_nayuki:
retq
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
- .section .note.GNU-stack,"",%progbits
+.section .note.GNU-stack,"",%progbits
#endif
.endif
diff --git a/src/Crypto/sha512-x86-nayuki.S b/src/Crypto/sha512-x86-nayuki.S
index dcbebf7..e1fce56 100644
--- a/src/Crypto/sha512-x86-nayuki.S
+++ b/src/Crypto/sha512-x86-nayuki.S
@@ -173,7 +173,7 @@
.quad 0x28DB77F523047D84, 0x32CAAB7B40C72493, 0x3C9EBE0A15C9BEBC, 0x431D67C49C100D4C
.quad 0x4CC5D4BECB3E42B6, 0x597F299CFC657E2A, 0x5FCB6FAB3AD6FAEC, 0x6C44198C4A475817
- .ifndef WINABI
+ .ifndef __YASM__
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif