Skip to content

Commit

Permalink
Add .type, .hidden, and .size to the new fiat ADX assembly
Browse files Browse the repository at this point in the history
.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 <agl@google.com>
Reviewed-by: Andres Erbsen <andreser@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
  • Loading branch information
davidben authored and Boringssl LUCI CQ committed Jun 7, 2023
1 parent 9d4f833 commit d995d82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions third_party/fiat/asm/fiat_curve25519_adx_mul.S
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
6 changes: 6 additions & 0 deletions third_party/fiat/asm/fiat_curve25519_adx_square.S
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

0 comments on commit d995d82

Please sign in to comment.