From d995d82ad53133017e34b009e9c6912b2ef6aeb7 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 6 Jun 2023 14:23:52 -0400 Subject: [PATCH] Add .type, .hidden, and .size to the new fiat ADX assembly .type seems to be needed for the unwind tester to report symbols correctly. I assume it does other useful things. .hidden (.private_extern on macOS) keeps it from being exported out of shared libraries. I'm not positive what .size does, but if ELF wants to know the size of the function, we should probably tell it that. Change-Id: Iaa2e4f8a72e81092ec1d81ee2177504c7dc89c76 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/60465 Commit-Queue: Adam Langley Reviewed-by: Andres Erbsen Reviewed-by: Adam Langley Auto-Submit: David Benjamin --- third_party/fiat/asm/fiat_curve25519_adx_mul.S | 6 ++++++ third_party/fiat/asm/fiat_curve25519_adx_square.S | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/third_party/fiat/asm/fiat_curve25519_adx_mul.S b/third_party/fiat/asm/fiat_curve25519_adx_mul.S index acbac97b89..1d23f3f25f 100644 --- a/third_party/fiat/asm/fiat_curve25519_adx_mul.S +++ b/third_party/fiat/asm/fiat_curve25519_adx_mul.S @@ -1,8 +1,11 @@ .text #if defined(__APPLE__) +.private_extern fiat_curve25519_adx_mul .global _fiat_curve25519_adx_mul _fiat_curve25519_adx_mul: #else +.type fiat_curve25519_adx_mul, @function +.hidden fiat_curve25519_adx_mul .global fiat_curve25519_adx_mul fiat_curve25519_adx_mul: #endif @@ -153,3 +156,6 @@ mov r15, [ rsp - 0x58 ] mov rbp, [rsp - 0x08] ret .cfi_endproc +#if defined(__ELF__) +.size fiat_curve25519_adx_mul, .-fiat_curve25519_adx_mul +#endif diff --git a/third_party/fiat/asm/fiat_curve25519_adx_square.S b/third_party/fiat/asm/fiat_curve25519_adx_square.S index 2ba3fd413a..71f9108bc0 100644 --- a/third_party/fiat/asm/fiat_curve25519_adx_square.S +++ b/third_party/fiat/asm/fiat_curve25519_adx_square.S @@ -1,8 +1,11 @@ .text #if defined(__APPLE__) +.private_extern fiat_curve25519_adx_square .global _fiat_curve25519_adx_square _fiat_curve25519_adx_square: #else +.type fiat_curve25519_adx_square, @function +.hidden fiat_curve25519_adx_square .global fiat_curve25519_adx_square fiat_curve25519_adx_square: #endif @@ -121,3 +124,6 @@ mov r15, [ rsp - 0x58 ] mov rbp, [rsp - 0x08] ret .cfi_endproc +#if defined(__ELF__) +.size fiat_curve25519_adx_square, .-fiat_curve25519_adx_square +#endif