From d532abef300dcdd61b7eefde2110293f1f437d91 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Wed, 8 Jan 2025 01:18:47 +0000 Subject: [PATCH] LoongArch: we should access global symbol by la.global instead of la.pcrel openssl will not be built successfully with binutils-2.43.50.20241230 which checks if global symbols are accessed by PC-relative in shared library. CLA: trivial Reviewed-by: Hugo Landau Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/26336) (cherry picked from commit dd7a79fc6fe2169612a7000c9b765b3e1d6f06bb) --- crypto/chacha/asm/chacha-loongarch64.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/chacha/asm/chacha-loongarch64.pl b/crypto/chacha/asm/chacha-loongarch64.pl index 48e9b52794e..d646d861664 100644 --- a/crypto/chacha/asm/chacha-loongarch64.pl +++ b/crypto/chacha/asm/chacha-loongarch64.pl @@ -72,7 +72,7 @@ ChaCha20_ctr32: beqz $len,.Lno_data ori $t3,$zero,64 - la.pcrel $t0,OPENSSL_loongarch_hwcap_P + la.global $t0,OPENSSL_loongarch_hwcap_P ld.w $t0,$t0,0 bleu $len,$t3,.LChaCha20_1x # goto 1x when len <= 64 -- 2.47.2