]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.22] cmd/link/internal/riscv64: generate local text symbols for...
authorJoel Sing <joel@sing.id.au>
Tue, 27 Feb 2024 12:57:43 +0000 (23:57 +1100)
committerThan McIntosh <thanm@google.com>
Tue, 26 Mar 2024 19:41:58 +0000 (19:41 +0000)
commit7fb7acb82d830dccb3a08c129535bd9bd8a29986
tree9b413c53f35396bf94e9ca51bf97a12a9a6fcca5
parente23707b59cc7842867cb6366e33eaf145b861f7c
[release-branch.go1.22] cmd/link/internal/riscv64: generate local text symbols for R_RISCV_CALL

Correctly generate local text symbols needed for R_RISCV_CALL when
external linking. R_RISCV_CALL was added in CL #520095 as a way of
marking AUIPC+JALR pairs, instead of overloading R_RISCV_PCREL_ITYPE.
However, genSymsLate was not updated to generate local text symbols
for the new relocation type, leading to HI20 symbol lookup failures.

This issue is detected by cmd/internal/obj/riscv.TestLargeCall,
however this is unfortunately skipped in short mode.

Fixes #66060

Change-Id: I8ee0f13791e0628f31657bf7dae2be8482b689b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/567375
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit b5a64ba62eafe5dee13562091ca03aef6cac87b6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/568157
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/riscv64/asm.go