diff options
author | David Benjamin <davidben@google.com> | 2016-02-11 19:31:49 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2016-02-11 20:28:03 +0300 |
commit | 3ab3e3db6e5e060612d9f2172aa0efa3ff8f55a3 (patch) | |
tree | 3a158d4135aea77772cb65372e7c65d899b53858 | |
parent | 5acc423517ec9d53e6cf2cd1b968405e0972c745 (diff) |
Mark ARM assembly globals hidden uniformly in arm-xlate.pl.
We'd manually marked some of them hidden, but missed some. Do it in the perlasm
driver instead since we will never expose an asm symbol directly. This reduces
some of our divergence from upstream on these files (and indeed we'd
accidentally lose some .hiddens at one point).
BUG=586141
Change-Id: Ie1bfc6f38ba73d33f5c56a8a40c2bf1668562e7e
Reviewed-on: https://boringssl-review.googlesource.com/7140
Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r-- | crypto/aes/asm/aes-armv4.pl | 5 | ||||
-rw-r--r-- | crypto/aes/asm/bsaes-armv7.pl | 8 | ||||
-rw-r--r-- | crypto/bn/asm/armv4-mont.pl | 1 | ||||
-rw-r--r-- | crypto/modes/asm/ghash-armv4.pl | 5 | ||||
-rwxr-xr-x | crypto/perlasm/arm-xlate.pl | 4 |
5 files changed, 3 insertions, 20 deletions
diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl index 882017a6..a60ed4cf 100644 --- a/crypto/aes/asm/aes-armv4.pl +++ b/crypto/aes/asm/aes-armv4.pl @@ -191,7 +191,6 @@ AES_Te: @ void asm_AES_encrypt(const unsigned char *in, unsigned char *out, @ const AES_KEY *key) { .global asm_AES_encrypt -.hidden asm_AES_encrypt .type asm_AES_encrypt,%function .align 5 asm_AES_encrypt: @@ -441,7 +440,6 @@ _armv4_AES_encrypt: .size _armv4_AES_encrypt,.-_armv4_AES_encrypt .global asm_AES_set_encrypt_key -.hidden asm_AES_set_encrypt_key .type asm_AES_set_encrypt_key,%function .align 5 asm_AES_set_encrypt_key: @@ -748,7 +746,6 @@ _armv4_AES_set_encrypt_key: .size asm_AES_set_encrypt_key,.-asm_AES_set_encrypt_key .global asm_AES_set_decrypt_key -.hidden asm_AES_set_decrypt_key .type asm_AES_set_decrypt_key,%function .align 5 asm_AES_set_decrypt_key: @@ -765,7 +762,6 @@ asm_AES_set_decrypt_key: @ void AES_set_enc2dec_key(const AES_KEY *inp,AES_KEY *out) .global AES_set_enc2dec_key -.hidden AES_set_enc2dec_key .type AES_set_enc2dec_key,%function .align 5 AES_set_enc2dec_key: @@ -971,7 +967,6 @@ AES_Td: @ void asm_AES_decrypt(const unsigned char *in, unsigned char *out, @ const AES_KEY *key) { .global asm_AES_decrypt -.hidden asm_AES_decrypt .type asm_AES_decrypt,%function .align 5 asm_AES_decrypt: diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl index 2617fef7..22362f51 100644 --- a/crypto/aes/asm/bsaes-armv7.pl +++ b/crypto/aes/asm/bsaes-armv7.pl @@ -1006,7 +1006,6 @@ if (0) { # following four functions are unsupported interface # used for benchmarking... $code.=<<___; .globl bsaes_enc_key_convert -.hidden bsaes_enc_key_convert .type bsaes_enc_key_convert,%function .align 4 bsaes_enc_key_convert: @@ -1025,7 +1024,6 @@ bsaes_enc_key_convert: .size bsaes_enc_key_convert,.-bsaes_enc_key_convert .globl bsaes_encrypt_128 -.hidden bsaes_encrypt_128 .type bsaes_encrypt_128,%function .align 4 bsaes_encrypt_128: @@ -1056,7 +1054,6 @@ bsaes_encrypt_128: .size bsaes_encrypt_128,.-bsaes_encrypt_128 .globl bsaes_dec_key_convert -.hidden bsaes_dec_key_convert .type bsaes_dec_key_convert,%function .align 4 bsaes_dec_key_convert: @@ -1077,7 +1074,6 @@ bsaes_dec_key_convert: .size bsaes_dec_key_convert,.-bsaes_dec_key_convert .globl bsaes_decrypt_128 -.hidden bsaes_decrypt_128 .type bsaes_decrypt_128,%function .align 4 bsaes_decrypt_128: @@ -1117,7 +1113,6 @@ $code.=<<___; .extern AES_decrypt .global bsaes_cbc_encrypt -.hidden bsaes_cbc_encrypt .type bsaes_cbc_encrypt,%function .align 5 bsaes_cbc_encrypt: @@ -1393,7 +1388,6 @@ my $keysched = "sp"; $code.=<<___; .extern AES_encrypt .global bsaes_ctr32_encrypt_blocks -.hidden bsaes_ctr32_encrypt_blocks .type bsaes_ctr32_encrypt_blocks,%function .align 5 bsaes_ctr32_encrypt_blocks: @@ -1635,7 +1629,6 @@ my @T=@XMM[6..7]; $code.=<<___; .globl bsaes_xts_encrypt -.hidden bsaes_xts_encrypt .type bsaes_xts_encrypt,%function .align 4 bsaes_xts_encrypt: @@ -2050,7 +2043,6 @@ $code.=<<___; .size bsaes_xts_encrypt,.-bsaes_xts_encrypt .globl bsaes_xts_decrypt -.hidden bsaes_xts_decrypt .type bsaes_xts_decrypt,%function .align 4 bsaes_xts_decrypt: diff --git a/crypto/bn/asm/armv4-mont.pl b/crypto/bn/asm/armv4-mont.pl index 4206fd85..afcbdf62 100644 --- a/crypto/bn/asm/armv4-mont.pl +++ b/crypto/bn/asm/armv4-mont.pl @@ -91,7 +91,6 @@ $code=<<___; #endif .global bn_mul_mont -.hidden bn_mul_mont .type bn_mul_mont,%function .align 5 diff --git a/crypto/modes/asm/ghash-armv4.pl b/crypto/modes/asm/ghash-armv4.pl index d3288223..bb0dba5f 100644 --- a/crypto/modes/asm/ghash-armv4.pl +++ b/crypto/modes/asm/ghash-armv4.pl @@ -163,7 +163,6 @@ rem_4bit_get: .size rem_4bit_get,.-rem_4bit_get .global gcm_ghash_4bit -.hidden gcm_ghash_4bit .type gcm_ghash_4bit,%function gcm_ghash_4bit: sub r12,pc,#8 @@ -260,7 +259,6 @@ $code.=<<___; .size gcm_ghash_4bit,.-gcm_ghash_4bit .global gcm_gmult_4bit -.hidden gcm_gmult_4bit .type gcm_gmult_4bit,%function gcm_gmult_4bit: stmdb sp!,{r4-r11,lr} @@ -391,7 +389,6 @@ $code.=<<___; .fpu neon .global gcm_init_neon -.hidden gcm_init_neon .type gcm_init_neon,%function .align 4 gcm_init_neon: @@ -413,7 +410,6 @@ gcm_init_neon: .size gcm_init_neon,.-gcm_init_neon .global gcm_gmult_neon -.hidden gcm_gmult_neon .type gcm_gmult_neon,%function .align 4 gcm_gmult_neon: @@ -432,7 +428,6 @@ gcm_gmult_neon: .size gcm_gmult_neon,.-gcm_gmult_neon .global gcm_ghash_neon -.hidden gcm_ghash_neon .type gcm_ghash_neon,%function .align 4 gcm_ghash_neon: diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl index 1cdc2d9a..6e9b0199 100755 --- a/crypto/perlasm/arm-xlate.pl +++ b/crypto/perlasm/arm-xlate.pl @@ -55,7 +55,9 @@ my $globl = sub { }; } - $ret = ".globl $name" if (!$ret); + $ret = ".globl $name\n"; + # All symbols in assembly files are hidden. + $ret .= &$hidden($name); $$global = $name; $ret; }; |