diff options
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl-1.0.2m/0001-aes-armv4-bsaes-armv7-sha256-armv4-.pl-make-it-work-.patch')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl-1.0.2m/0001-aes-armv4-bsaes-armv7-sha256-armv4-.pl-make-it-work-.patch | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.2m/0001-aes-armv4-bsaes-armv7-sha256-armv4-.pl-make-it-work-.patch b/meta/recipes-connectivity/openssl/openssl-1.0.2m/0001-aes-armv4-bsaes-armv7-sha256-armv4-.pl-make-it-work-.patch new file mode 100644 index 0000000000..2ce0320c49 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl-1.0.2m/0001-aes-armv4-bsaes-armv7-sha256-armv4-.pl-make-it-work-.patch | |||
@@ -0,0 +1,100 @@ | |||
1 | From d1d6c69b6fd25e71dbae67fad17b2c7737f6b2dc Mon Sep 17 00:00:00 2001 | ||
2 | From: Andy Polyakov <appro@openssl.org> | ||
3 | Date: Sun, 5 Nov 2017 17:08:16 +0100 | ||
4 | Subject: [PATCH] {aes-armv4|bsaes-armv7|sha256-armv4}.pl: make it work with | ||
5 | binutils-2.29 | ||
6 | |||
7 | It's not clear if it's a feature or bug, but binutils-2.29[.1] | ||
8 | interprets 'adr' instruction with Thumb2 code reference differently, | ||
9 | in a way that affects calculation of addresses of constants' tables. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | |||
13 | Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> | ||
14 | Reviewed-by: Kurt Roeckx <kurt@roeckx.be> | ||
15 | Signed-off-by: Stefan Agner <stefan.agner@toradex.com> | ||
16 | (Merged from https://github.com/openssl/openssl/pull/4673) | ||
17 | --- | ||
18 | crypto/aes/asm/aes-armv4.pl | 6 +++--- | ||
19 | crypto/aes/asm/bsaes-armv7.pl | 6 +++--- | ||
20 | crypto/sha/asm/sha256-armv4.pl | 2 +- | ||
21 | 3 files changed, 7 insertions(+), 7 deletions(-) | ||
22 | |||
23 | diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl | ||
24 | index 4f8917089f..c1b5e352d7 100644 | ||
25 | --- a/crypto/aes/asm/aes-armv4.pl | ||
26 | +++ b/crypto/aes/asm/aes-armv4.pl | ||
27 | @@ -184,7 +184,7 @@ AES_encrypt: | ||
28 | #if __ARM_ARCH__<7 | ||
29 | sub r3,pc,#8 @ AES_encrypt | ||
30 | #else | ||
31 | - adr r3,AES_encrypt | ||
32 | + adr r3,. | ||
33 | #endif | ||
34 | stmdb sp!,{r1,r4-r12,lr} | ||
35 | mov $rounds,r0 @ inp | ||
36 | @@ -430,7 +430,7 @@ _armv4_AES_set_encrypt_key: | ||
37 | #if __ARM_ARCH__<7 | ||
38 | sub r3,pc,#8 @ AES_set_encrypt_key | ||
39 | #else | ||
40 | - adr r3,private_AES_set_encrypt_key | ||
41 | + adr r3,. | ||
42 | #endif | ||
43 | teq r0,#0 | ||
44 | #if __ARM_ARCH__>=7 | ||
45 | @@ -952,7 +952,7 @@ AES_decrypt: | ||
46 | #if __ARM_ARCH__<7 | ||
47 | sub r3,pc,#8 @ AES_decrypt | ||
48 | #else | ||
49 | - adr r3,AES_decrypt | ||
50 | + adr r3,. | ||
51 | #endif | ||
52 | stmdb sp!,{r1,r4-r12,lr} | ||
53 | mov $rounds,r0 @ inp | ||
54 | diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl | ||
55 | index 70b3f9656f..ec66b0502a 100644 | ||
56 | --- a/crypto/aes/asm/bsaes-armv7.pl | ||
57 | +++ b/crypto/aes/asm/bsaes-armv7.pl | ||
58 | @@ -724,7 +724,7 @@ $code.=<<___; | ||
59 | .type _bsaes_decrypt8,%function | ||
60 | .align 4 | ||
61 | _bsaes_decrypt8: | ||
62 | - adr $const,_bsaes_decrypt8 | ||
63 | + adr $const,. | ||
64 | vldmia $key!, {@XMM[9]} @ round 0 key | ||
65 | add $const,$const,#.LM0ISR-_bsaes_decrypt8 | ||
66 | |||
67 | @@ -819,7 +819,7 @@ _bsaes_const: | ||
68 | .type _bsaes_encrypt8,%function | ||
69 | .align 4 | ||
70 | _bsaes_encrypt8: | ||
71 | - adr $const,_bsaes_encrypt8 | ||
72 | + adr $const,. | ||
73 | vldmia $key!, {@XMM[9]} @ round 0 key | ||
74 | sub $const,$const,#_bsaes_encrypt8-.LM0SR | ||
75 | |||
76 | @@ -923,7 +923,7 @@ $code.=<<___; | ||
77 | .type _bsaes_key_convert,%function | ||
78 | .align 4 | ||
79 | _bsaes_key_convert: | ||
80 | - adr $const,_bsaes_key_convert | ||
81 | + adr $const,. | ||
82 | vld1.8 {@XMM[7]}, [$inp]! @ load round 0 key | ||
83 | sub $const,$const,#_bsaes_key_convert-.LM0 | ||
84 | vld1.8 {@XMM[15]}, [$inp]! @ load round 1 key | ||
85 | diff --git a/crypto/sha/asm/sha256-armv4.pl b/crypto/sha/asm/sha256-armv4.pl | ||
86 | index 4fee74d832..750216eb42 100644 | ||
87 | --- a/crypto/sha/asm/sha256-armv4.pl | ||
88 | +++ b/crypto/sha/asm/sha256-armv4.pl | ||
89 | @@ -205,7 +205,7 @@ sha256_block_data_order: | ||
90 | #if __ARM_ARCH__<7 | ||
91 | sub r3,pc,#8 @ sha256_block_data_order | ||
92 | #else | ||
93 | - adr r3,sha256_block_data_order | ||
94 | + adr r3,. | ||
95 | #endif | ||
96 | #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) | ||
97 | ldr r12,.LOPENSSL_armcap | ||
98 | -- | ||
99 | 2.15.0 | ||
100 | |||