From eb710f2529d183f8ea1c20f438445b903480d281 Mon Sep 17 00:00:00 2001 From: xicilion Date: Sun, 11 Feb 2024 03:46:46 +0800 Subject: [PATCH] openssl, bugfix: relocation truncated on ppc64 and riscv64. --- openssl/src/crypto/aes/gen/linux_riscv64/aes-riscv64.s | 3 ++- openssl/src/crypto/chacha/gen/linux_ppc64/chachap10-ppc.s | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openssl/src/crypto/aes/gen/linux_riscv64/aes-riscv64.s b/openssl/src/crypto/aes/gen/linux_riscv64/aes-riscv64.s index eb15f7770..b8fb9e72e 100644 --- a/openssl/src/crypto/aes/gen/linux_riscv64/aes-riscv64.s +++ b/openssl/src/crypto/aes/gen/linux_riscv64/aes-riscv64.s @@ -994,7 +994,8 @@ AES_set_decrypt_key: addi sp,sp,-16 sd x12,0(sp) # We need to hold onto this! sd ra,8(sp) - jal ra,AES_set_encrypt_key + la t0,AES_set_encrypt_key + jalr ra,t0 ld x12,0(sp) ld ra,8(sp) addi sp,sp,16 diff --git a/openssl/src/crypto/chacha/gen/linux_ppc64/chachap10-ppc.s b/openssl/src/crypto/chacha/gen/linux_ppc64/chachap10-ppc.s index 81e5eb239..dc098ec4d 100644 --- a/openssl/src/crypto/chacha/gen/linux_ppc64/chachap10-ppc.s +++ b/openssl/src/crypto/chacha/gen/linux_ppc64/chachap10-ppc.s @@ -6,7 +6,9 @@ ChaCha20_ctr32_vsx_p10: .localentry ChaCha20_ctr32_vsx_p10,0 cmpldi 5,255 - bgt ChaCha20_ctr32_vsx_8x + ble .Not_greater_than_8x + b ChaCha20_ctr32_vsx_8x +.Not_greater_than_8x: stdu 1,-224(1) mflr 0 li 10,127