]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv: correct CALL reloc symbol handling
authorJoel Sing <joel@sing.id.au>
Tue, 31 Dec 2019 14:44:54 +0000 (01:44 +1100)
committerJoel Sing <joel@sing.id.au>
Sat, 4 Jan 2020 04:11:40 +0000 (04:11 +0000)
commit3a6cd4c72d5c8fc6c86f074eadaaf3972e591973
treee95936b57e76f890a5dbae3b352ac27e2032c3e0
parent24902c5be6ba2eac6919879d2e5cb0a7bdadf91c
cmd/internal/obj/riscv: correct CALL reloc symbol handling

Move the CALL reloc symbol back to p.From.Sym, rather than p.To.Sym - while
p.To.Sym is the correct final location, the call to lowerJALR flips the p.To
and p.From addresses (and proves that this form of obj.Prog rewriting is not
a good idea).

Updates #27532

Change-Id: Iaf9fa24b05bda32b963f8d243401c6cd82c1355c
Reviewed-on: https://go-review.googlesource.com/c/go/+/212759
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/internal/obj/riscv/obj.go