diff options
author | Adam Langley <agl@google.com> | 2015-03-06 11:08:23 -0800 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-03-06 12:15:23 -0800 |
commit | a4fb56a4374ac52a0b1c23e3654d4426c2e4adb3 (patch) | |
tree | fc5be1795f1cb25893d1dda8f9f581ed8430dece | |
parent | 73e611480396013cb4e059bb9e5ebb0db8e1ffce (diff) | |
download | external_boringssl-a4fb56a4374ac52a0b1c23e3654d4426c2e4adb3.zip external_boringssl-a4fb56a4374ac52a0b1c23e3654d4426c2e4adb3.tar.gz external_boringssl-a4fb56a4374ac52a0b1c23e3654d4426c2e4adb3.tar.bz2 |
Include .extern and .hidden in x86-64 asm.
This is backport of BoringSSL's d216b71f909fe56255813dab0a8d052534bdcb91
and https://boringssl-review.googlesource.com/3810 and should allow asm
on x86-64 to build correctly.
Change-Id: Id321768930182951223dbf90c4c910e24d9b6798
-rw-r--r-- | linux-x86_64/crypto/aes/aes-x86_64.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/aes/aesni-x86_64.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/aes/bsaes-x86_64.S | 9 | ||||
-rw-r--r-- | linux-x86_64/crypto/bn/rsaz-x86_64.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/bn/x86_64-mont.S | 6 | ||||
-rw-r--r-- | linux-x86_64/crypto/bn/x86_64-mont5.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/modes/ghash-x86_64.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/rc4/rc4-x86_64.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/sha/sha1-x86_64.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/sha/sha256-x86_64.S | 3 | ||||
-rw-r--r-- | linux-x86_64/crypto/sha/sha512-x86_64.S | 3 | ||||
-rwxr-xr-x | src/crypto/perlasm/x86_64-xlate.pl | 6 |
12 files changed, 33 insertions, 15 deletions
diff --git a/linux-x86_64/crypto/aes/aes-x86_64.S b/linux-x86_64/crypto/aes/aes-x86_64.S index b01ad7f..5f4b057 100644 --- a/linux-x86_64/crypto/aes/aes-x86_64.S +++ b/linux-x86_64/crypto/aes/aes-x86_64.S @@ -1294,7 +1294,8 @@ asm_AES_set_decrypt_key: .globl asm_AES_cbc_encrypt .hidden asm_AES_cbc_encrypt .type asm_AES_cbc_encrypt,@function - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .hidden asm_AES_cbc_encrypt asm_AES_cbc_encrypt: cmpq $0,%rdx diff --git a/linux-x86_64/crypto/aes/aesni-x86_64.S b/linux-x86_64/crypto/aes/aesni-x86_64.S index 9ab973d..ecefbe5 100644 --- a/linux-x86_64/crypto/aes/aesni-x86_64.S +++ b/linux-x86_64/crypto/aes/aesni-x86_64.S @@ -1,6 +1,7 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl aesni_encrypt .hidden aesni_encrypt .type aesni_encrypt,@function diff --git a/linux-x86_64/crypto/aes/bsaes-x86_64.S b/linux-x86_64/crypto/aes/bsaes-x86_64.S index 2960e95..8cfa4df 100644 --- a/linux-x86_64/crypto/aes/bsaes-x86_64.S +++ b/linux-x86_64/crypto/aes/bsaes-x86_64.S @@ -1,8 +1,10 @@ #if defined(__x86_64__) .text - - +.extern asm_AES_encrypt +.hidden asm_AES_encrypt +.extern asm_AES_decrypt +.hidden asm_AES_decrypt .type _bsaes_encrypt8,@function .align 64 @@ -1063,7 +1065,8 @@ _bsaes_key_convert: .byte 0xf3,0xc3 .size _bsaes_key_convert,.-_bsaes_key_convert - +.extern asm_AES_cbc_encrypt +.hidden asm_AES_cbc_encrypt .globl bsaes_cbc_encrypt .hidden bsaes_cbc_encrypt .type bsaes_cbc_encrypt,@function diff --git a/linux-x86_64/crypto/bn/rsaz-x86_64.S b/linux-x86_64/crypto/bn/rsaz-x86_64.S index fe0eed5..dd3d310 100644 --- a/linux-x86_64/crypto/bn/rsaz-x86_64.S +++ b/linux-x86_64/crypto/bn/rsaz-x86_64.S @@ -1,7 +1,8 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl rsaz_512_sqr .hidden rsaz_512_sqr diff --git a/linux-x86_64/crypto/bn/x86_64-mont.S b/linux-x86_64/crypto/bn/x86_64-mont.S index ebe7678..4d401c6 100644 --- a/linux-x86_64/crypto/bn/x86_64-mont.S +++ b/linux-x86_64/crypto/bn/x86_64-mont.S @@ -1,7 +1,8 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl bn_mul_mont .hidden bn_mul_mont @@ -610,7 +611,8 @@ bn_mul4x_mont: .Lmul4x_epilogue: .byte 0xf3,0xc3 .size bn_mul4x_mont,.-bn_mul4x_mont - +.extern bn_sqr8x_internal +.hidden bn_sqr8x_internal .type bn_sqr8x_mont,@function .align 32 diff --git a/linux-x86_64/crypto/bn/x86_64-mont5.S b/linux-x86_64/crypto/bn/x86_64-mont5.S index 357bc11..02edc69 100644 --- a/linux-x86_64/crypto/bn/x86_64-mont5.S +++ b/linux-x86_64/crypto/bn/x86_64-mont5.S @@ -1,7 +1,8 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl bn_mul_mont_gather5 .hidden bn_mul_mont_gather5 diff --git a/linux-x86_64/crypto/modes/ghash-x86_64.S b/linux-x86_64/crypto/modes/ghash-x86_64.S index bd1b17f..1db7d69 100644 --- a/linux-x86_64/crypto/modes/ghash-x86_64.S +++ b/linux-x86_64/crypto/modes/ghash-x86_64.S @@ -1,6 +1,7 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl gcm_gmult_4bit .hidden gcm_gmult_4bit diff --git a/linux-x86_64/crypto/rc4/rc4-x86_64.S b/linux-x86_64/crypto/rc4/rc4-x86_64.S index edd6565..b022808 100644 --- a/linux-x86_64/crypto/rc4/rc4-x86_64.S +++ b/linux-x86_64/crypto/rc4/rc4-x86_64.S @@ -1,6 +1,7 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl asm_RC4 .hidden asm_RC4 diff --git a/linux-x86_64/crypto/sha/sha1-x86_64.S b/linux-x86_64/crypto/sha/sha1-x86_64.S index ea2f403..7668c2b 100644 --- a/linux-x86_64/crypto/sha/sha1-x86_64.S +++ b/linux-x86_64/crypto/sha/sha1-x86_64.S @@ -1,6 +1,7 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl sha1_block_data_order .hidden sha1_block_data_order diff --git a/linux-x86_64/crypto/sha/sha256-x86_64.S b/linux-x86_64/crypto/sha/sha256-x86_64.S index 4649baf..f526de5 100644 --- a/linux-x86_64/crypto/sha/sha256-x86_64.S +++ b/linux-x86_64/crypto/sha/sha256-x86_64.S @@ -1,7 +1,8 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl sha256_block_data_order .hidden sha256_block_data_order .type sha256_block_data_order,@function diff --git a/linux-x86_64/crypto/sha/sha512-x86_64.S b/linux-x86_64/crypto/sha/sha512-x86_64.S index 89fd5bf..ca3a3a1 100644 --- a/linux-x86_64/crypto/sha/sha512-x86_64.S +++ b/linux-x86_64/crypto/sha/sha512-x86_64.S @@ -1,7 +1,8 @@ #if defined(__x86_64__) .text - +.extern OPENSSL_ia32cap_P +.hidden OPENSSL_ia32cap_P .globl sha512_block_data_order .hidden sha512_block_data_order .type sha512_block_data_order,@function diff --git a/src/crypto/perlasm/x86_64-xlate.pl b/src/crypto/perlasm/x86_64-xlate.pl index ed545f2..8b46329 100755 --- a/src/crypto/perlasm/x86_64-xlate.pl +++ b/src/crypto/perlasm/x86_64-xlate.pl @@ -497,7 +497,11 @@ my %globals; $self->{value} = $dir . "\t" . $line; if ($dir =~ /\.extern/) { - $self->{value} = ""; # swallow extern + if ($flavour eq "elf") { + $self->{value} .= "\n.hidden $line"; + } else { + $self->{value} = ""; + } } elsif (!$elf && $dir =~ /\.type/) { $self->{value} = ""; $self->{value} = ".def\t" . ($globals{$1} or $1) . ";\t" . |