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 <hlandau@devever.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26336)

(cherry picked from commit dd7a79fc6f)
This commit is contained in:
Wang Xin 2025-01-08 01:18:47 +00:00 committed by Tomas Mraz
parent 6639ec5881
commit 7fa2c33757

View file

@ -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