aboutsummaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2023-06-07 17:43:52 -0400
committerBoringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-06-08 01:55:30 +0000
commit3f680b0eff18ddd6c878b92bffbc1b53fe6bd797 (patch)
tree14f08281297c0f65ab70317c98b1653ac4b816ad /third_party
parentaaf771e493af8d23cc50aaa036b22195cd888090 (diff)
downloadboringssl-3f680b0eff18ddd6c878b92bffbc1b53fe6bd797.zip
boringssl-3f680b0eff18ddd6c878b92bffbc1b53fe6bd797.tar.gz
boringssl-3f680b0eff18ddd6c878b92bffbc1b53fe6bd797.tar.bz2
Remove a layer of indirection from fiat curve25519 assembly
This fixes the generated Bazel build. Bazel is strict about having all dependencies declared, which includes files that are #included into other files. (It also is not particularly pleased about textual headers and wants them declared in a separate place.) The new fiat curve25519 assembly is currently split into a BoringSSL half, and a more generic fiat half. For now, just move the BoringSSL customizations directly into the fiat half. This isn't ideal, as we'd, long term, like something where the fiat code can be made standalone. But, to fix the build, just patch in the changes now and we can ponder how to do this better later. (Build tools and conventions for assembly are much less clear than C, sadly.) Also add the .note.GNU-stack bit at the end. Change-Id: I04aa733eabf8562dba42dee63a8fd25c86a59db9 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/60566 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: David Benjamin <davidben@google.com>
Diffstat (limited to 'third_party')
-rw-r--r--third_party/fiat/asm/fiat_curve25519_adx_mul.S14
-rw-r--r--third_party/fiat/asm/fiat_curve25519_adx_square.S14
2 files changed, 28 insertions, 0 deletions
diff --git a/third_party/fiat/asm/fiat_curve25519_adx_mul.S b/third_party/fiat/asm/fiat_curve25519_adx_mul.S
index 1d23f3f..f91e67d 100644
--- a/third_party/fiat/asm/fiat_curve25519_adx_mul.S
+++ b/third_party/fiat/asm/fiat_curve25519_adx_mul.S
@@ -1,3 +1,11 @@
+#if !defined(OPENSSL_NO_ASM) && defined(__x86_64__) && \
+ (defined(__APPLE__) || defined(__ELF__))
+
+#if defined(BORINGSSL_PREFIX)
+#include <boringssl_prefix_symbols_asm.h>
+#endif
+
+.intel_syntax noprefix
.text
#if defined(__APPLE__)
.private_extern fiat_curve25519_adx_mul
@@ -159,3 +167,9 @@ ret
#if defined(__ELF__)
.size fiat_curve25519_adx_mul, .-fiat_curve25519_adx_mul
#endif
+
+#endif
+
+#if defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/third_party/fiat/asm/fiat_curve25519_adx_square.S b/third_party/fiat/asm/fiat_curve25519_adx_square.S
index 71f9108..027dcf1 100644
--- a/third_party/fiat/asm/fiat_curve25519_adx_square.S
+++ b/third_party/fiat/asm/fiat_curve25519_adx_square.S
@@ -1,3 +1,11 @@
+#if !defined(OPENSSL_NO_ASM) && defined(__x86_64__) && \
+ (defined(__APPLE__) || defined(__ELF__))
+
+#if defined(BORINGSSL_PREFIX)
+#include <boringssl_prefix_symbols_asm.h>
+#endif
+
+.intel_syntax noprefix
.text
#if defined(__APPLE__)
.private_extern fiat_curve25519_adx_square
@@ -127,3 +135,9 @@ ret
#if defined(__ELF__)
.size fiat_curve25519_adx_square, .-fiat_curve25519_adx_square
#endif
+
+#endif
+
+#if defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif