aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modcmd/tidy.go
diff options
context:
space:
mode:
authorLynn Boger <laboger@linux.vnet.ibm.com>2021-04-29 16:07:25 -0500
committerCarlos Amedee <carlos@golang.org>2021-06-02 18:44:16 +0000
commit448be06c36caa792b12d997fea8cae50ba7d9de0 (patch)
treeaee04abd0873d04d3883d6afc67076638e347c37 /src/cmd/go/internal/modcmd/tidy.go
parente3c9537541e35460f4fca12fe36fec822a8d53e3 (diff)
downloadgo-448be06c36caa792b12d997fea8cae50ba7d9de0.tar.gz
go-448be06c36caa792b12d997fea8cae50ba7d9de0.zip
[release-branch.go1.15] cmd/link/internal: fix use of DynlinkingGo with ppc64le trampolines
When creating programs with large text sections on ppc64le, trampolines are needed for calls that are too far; however they are not created if the code is generated such that the TOC register r2 is initialized and maintained in the code because then the external linker can create the trampolines. Previously the function DynlinkingGo was used to determine this but in the case where plugins are used, this could return true even though r2 is not valid. To fix this problem I've added a new function r2Valid which returns true when the build options indicate that the r2 is initialized and maintained. Because of the ways that DynlinkingGo is used I wanted to maintain its previous behavior. Fixes #46002 Change-Id: I6d902eba6ad41757aa6474948b79acdbd479cb38 Reviewed-on: https://go-review.googlesource.com/c/go/+/315289 Trust: Lynn Boger <laboger@linux.vnet.ibm.com> Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> (cherry picked from commit 9ed736ac2a99aa2e7ef7d8bed3b01ca8b20a6f80) Reviewed-on: https://go-review.googlesource.com/c/go/+/317974 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/go/internal/modcmd/tidy.go')
0 files changed, 0 insertions, 0 deletions