Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-02-20 04:48:29 +0300
committerAdam Langley <agl@google.com>2015-02-21 00:24:01 +0300
commit97999919bbe85ab213d283e18e597e028f8685d1 (patch)
treed1410b26a832dae606ea255ad5dce6b0b449cce7 /crypto/bn/asm
parentbcc4e2304123169af6acd1b842509430e79fd390 (diff)
Hide all asm symbols.
We are leaking asm symbols in Android builds because the asm code isn't affected by -fvisibility=hidden. This change hides all asm symbols. This assumes that no asm symbols are public API and that should be true. Some points to note: In crypto/rc4/asm/rc4-md5-x86_64.pl there are |RC4_set_key| and |RC4_options| functions which aren't getting marked as hidden. That's because those functions aren't actually ever generated. (I'm just trying to minimise drift with upstream here.) In crypto/rc4/asm/rc4-x86_64.pl there's |RC4_options| which is "public" API, except that we've never had it in the header files. So I've just deleted it. Since we have an internal caller, we'll probably have to put it back in the future, but it can just be done in rc4.c to save problems. BUG=448386 Change-Id: I3846617a0e3d73ec9e5ec3638a53364adbbc6260 Reviewed-on: https://boringssl-review.googlesource.com/3520 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bn/asm')
-rw-r--r--crypto/bn/asm/rsaz-avx2.pl14
-rw-r--r--crypto/bn/asm/x86_64-mont.pl1
2 files changed, 15 insertions, 0 deletions
diff --git a/crypto/bn/asm/rsaz-avx2.pl b/crypto/bn/asm/rsaz-avx2.pl
index 3b6ccf83..9a9223b3 100644
--- a/crypto/bn/asm/rsaz-avx2.pl
+++ b/crypto/bn/asm/rsaz-avx2.pl
@@ -159,6 +159,7 @@ $code.=<<___;
.globl rsaz_1024_sqr_avx2
.type rsaz_1024_sqr_avx2,\@function,5
+.hidden rsaz_1024_sqr_avx2
.align 64
rsaz_1024_sqr_avx2: # 702 cycles, 14% faster than rsaz_1024_mul_avx2
lea (%rsp), %rax
@@ -891,6 +892,7 @@ $bp="%r13"; # reassigned argument
$code.=<<___;
.globl rsaz_1024_mul_avx2
.type rsaz_1024_mul_avx2,\@function,5
+.hidden rsaz_1024_mul_avx2
.align 64
rsaz_1024_mul_avx2:
lea (%rsp), %rax
@@ -1484,6 +1486,7 @@ my @T = map("%r$_",(8..11));
$code.=<<___;
.globl rsaz_1024_red2norm_avx2
.type rsaz_1024_red2norm_avx2,\@abi-omnipotent
+.hidden rsaz_1024_red2norm_avx2
.align 32
rsaz_1024_red2norm_avx2:
sub \$-128,$inp # size optimization
@@ -1523,6 +1526,7 @@ $code.=<<___;
.globl rsaz_1024_norm2red_avx2
.type rsaz_1024_norm2red_avx2,\@abi-omnipotent
+.hidden rsaz_1024_norm2red_avx2
.align 32
rsaz_1024_norm2red_avx2:
sub \$-128,$out # size optimization
@@ -1565,6 +1569,7 @@ my ($out,$inp,$power) = $win64 ? ("%rcx","%rdx","%r8d") : ("%rdi","%rsi","%edx")
$code.=<<___;
.globl rsaz_1024_scatter5_avx2
.type rsaz_1024_scatter5_avx2,\@abi-omnipotent
+.hidden rsaz_1024_scatter5_avx2
.align 32
rsaz_1024_scatter5_avx2:
vzeroupper
@@ -1590,6 +1595,7 @@ rsaz_1024_scatter5_avx2:
.globl rsaz_1024_gather5_avx2
.type rsaz_1024_gather5_avx2,\@abi-omnipotent
+.hidden rsaz_1024_gather5_avx2
.align 32
rsaz_1024_gather5_avx2:
___
@@ -1684,6 +1690,7 @@ $code.=<<___;
.extern OPENSSL_ia32cap_P
.globl rsaz_avx2_eligible
.type rsaz_avx2_eligible,\@abi-omnipotent
+.hidden rsaz_avx2_eligible
.align 32
rsaz_avx2_eligible:
mov OPENSSL_ia32cap_P+8(%rip),%eax
@@ -1871,6 +1878,7 @@ print <<___; # assembler is too old
.globl rsaz_avx2_eligible
.type rsaz_avx2_eligible,\@abi-omnipotent
+.hidden rsaz_avx2_eligible
rsaz_avx2_eligible:
xor %eax,%eax
ret
@@ -1882,6 +1890,12 @@ rsaz_avx2_eligible:
.globl rsaz_1024_red2norm_avx2
.globl rsaz_1024_scatter5_avx2
.globl rsaz_1024_gather5_avx2
+.hidden rsaz_1024_sqr_avx2
+.hidden rsaz_1024_mul_avx2
+.hidden rsaz_1024_norm2red_avx2
+.hidden rsaz_1024_red2norm_avx2
+.hidden rsaz_1024_scatter5_avx2
+.hidden rsaz_1024_gather5_avx2
.type rsaz_1024_sqr_avx2,\@abi-omnipotent
rsaz_1024_sqr_avx2:
rsaz_1024_mul_avx2:
diff --git a/crypto/bn/asm/x86_64-mont.pl b/crypto/bn/asm/x86_64-mont.pl
index 39476ab0..38af80a8 100644
--- a/crypto/bn/asm/x86_64-mont.pl
+++ b/crypto/bn/asm/x86_64-mont.pl
@@ -90,6 +90,7 @@ $code=<<___;
.globl bn_mul_mont
.type bn_mul_mont,\@function,6
+.hidden bn_mul_mont
.align 16
bn_mul_mont:
test \$3,${num}d