diff options
author | Adam Langley <agl@google.com> | 2015-09-25 05:02:02 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-09-29 21:02:14 +0300 |
commit | 2ab24a2d40fd193a25d7c94072596a1180cbb460 (patch) | |
tree | a7486767f5454a12d8c89c6d42593fb7e984e1ec /crypto/sha | |
parent | 502ca43fc8fb7e017e74a2e4646419988a6c363a (diff) |
Put arm/aarch64 assembly functions in their own section.
This change causes each global arm or aarch64 asm function to be put
into its own section by default. This matches the behaviour of the
-ffunction-sections option to GCC and allows the --gc-sections option to
the linker to discard unused asm functions on a function-by-function
basis.
Sometimes several asm functions will share the same data an, in that
situation, the data is put into the section of one of the functions and
the section of the other function is merged with the added
“.global_with_section” directive.
Change-Id: I12c9b844d48d104d28beb816764358551eac4456
Reviewed-on: https://boringssl-review.googlesource.com/6003
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/sha')
-rw-r--r-- | crypto/sha/asm/sha256-armv4.pl | 4 | ||||
-rw-r--r-- | crypto/sha/asm/sha512-armv4.pl | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/crypto/sha/asm/sha256-armv4.pl b/crypto/sha/asm/sha256-armv4.pl index 7e071474..b293f844 100644 --- a/crypto/sha/asm/sha256-armv4.pl +++ b/crypto/sha/asm/sha256-armv4.pl @@ -187,6 +187,7 @@ $code=<<___; # endif #endif +.pushsection .text.sha256_block_data_order,"ax",%progbits .type K256,%object .align 5 K256: @@ -212,6 +213,7 @@ K256: .LOPENSSL_armcap: .word OPENSSL_armcap_P-.Lsha256_block_data_order #endif +.popsection .align 5 .global sha256_block_data_order @@ -471,7 +473,7 @@ $code.=<<___; .arch armv7-a .fpu neon -.global sha256_block_data_order_neon +.global_with_section sha256_block_data_order_neon, sha256_block_data_order .type sha256_block_data_order_neon,%function .align 4 sha256_block_data_order_neon: diff --git a/crypto/sha/asm/sha512-armv4.pl b/crypto/sha/asm/sha512-armv4.pl index cd3662a5..4c1cbae2 100644 --- a/crypto/sha/asm/sha512-armv4.pl +++ b/crypto/sha/asm/sha512-armv4.pl @@ -224,6 +224,7 @@ $code=<<___; # endif #endif +.pushsection .text.sha512_block_data_order,"ax",%progbits .type K512,%object .align 5 K512: @@ -275,6 +276,7 @@ WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817) #else .skip 32 #endif +.popsection .global sha512_block_data_order .type sha512_block_data_order,%function @@ -602,7 +604,7 @@ $code.=<<___; .arch armv7-a .fpu neon -.global sha512_block_data_order_neon +.global_with_section sha512_block_data_order_neon, sha512_block_data_order .type sha512_block_data_order_neon,%function .align 4 sha512_block_data_order_neon: |