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/rc4
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/rc4')
-rw-r--r--crypto/rc4/asm/rc4-md5-x86_64.pl1
-rw-r--r--crypto/rc4/asm/rc4-x86_64.pl28
2 files changed, 3 insertions, 26 deletions
diff --git a/crypto/rc4/asm/rc4-md5-x86_64.pl b/crypto/rc4/asm/rc4-md5-x86_64.pl
index 272fa91e..8ebf4051 100644
--- a/crypto/rc4/asm/rc4-md5-x86_64.pl
+++ b/crypto/rc4/asm/rc4-md5-x86_64.pl
@@ -110,6 +110,7 @@ $code.=<<___;
.globl $func
.type $func,\@function,$nargs
+.hidden $func
$func:
cmp \$0,$len
je .Labort
diff --git a/crypto/rc4/asm/rc4-x86_64.pl b/crypto/rc4/asm/rc4-x86_64.pl
index 2c52ac08..14e4da1b 100644
--- a/crypto/rc4/asm/rc4-x86_64.pl
+++ b/crypto/rc4/asm/rc4-x86_64.pl
@@ -127,6 +127,7 @@ $code=<<___;
.globl asm_RC4
.type asm_RC4,\@function,4
+.hidden asm_RC4
.align 16
asm_RC4:
or $len,$len
@@ -433,6 +434,7 @@ $ido="%r9";
$code.=<<___;
.globl asm_RC4_set_key
.type asm_RC4_set_key,\@function,3
+.hidden asm_RC4_set_key
.align 16
asm_RC4_set_key:
lea 8($dat),$dat
@@ -502,32 +504,6 @@ asm_RC4_set_key:
mov %eax,-4($dat)
ret
.size asm_RC4_set_key,.-asm_RC4_set_key
-
-.globl RC4_options
-.type RC4_options,\@abi-omnipotent
-.align 16
-RC4_options:
- lea .Lopts(%rip),%rax
- mov OPENSSL_ia32cap_P(%rip),%rdx
- mov (%rdx),%edx
- bt \$20,%edx
- jc .L8xchar
- bt \$30,%edx
- jnc .Ldone
- add \$25,%rax
- ret
-.L8xchar:
- add \$12,%rax
-.Ldone:
- ret
-.align 64
-.Lopts:
-.asciz "rc4(8x,int)"
-.asciz "rc4(8x,char)"
-.asciz "rc4(16x,int)"
-.asciz "RC4 for x86_64, CRYPTOGAMS by <appro\@openssl.org>"
-.align 64
-.size RC4_options,.-RC4_options
___
# EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame,