summaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/loader/loader.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2021-09-21 14:35:37 -0400
committerCherry Mui <cherryyz@google.com>2021-09-22 13:50:24 +0000
commit98989f2a74aa53e9ea64c41c94e66f02beceecc9 (patch)
tree3d8aadfd4fbf72c9eee6185a9524a4f4dd0a4935 /src/cmd/link/internal/loader/loader.go
parente925c4640d52587e6657bccc40899888b657e6df (diff)
downloadgo-git-98989f2a74aa53e9ea64c41c94e66f02beceecc9.tar.gz
cmd/compile, cmd/link: avoid ABI aliases
In the past we introduced ABI aliases, in preparation for ABI wrappers. Now that we have ABI wrappers implemented, we don't need ABI aliases. If ABI wrappers are not enabled, ABI0 and ABIInternal are actually identical, so we can resolve symbol references without distinguish them. This CL does so by normalizing ABIInternal to ABI0 at link time. This way, we no longer need to generate ABI aliases. This CL doesn't clean up everything related to ABI aliases, which will be done in followup CLs. Change-Id: I5b5db43370d29b8ad153078c70a853e3263ae6f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/351271 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/link/internal/loader/loader.go')
-rw-r--r--src/cmd/link/internal/loader/loader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index b9a1da6f45..487559829f 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -2192,7 +2192,7 @@ func (st *loadState) preloadSyms(r *oReader, kind int) {
}
if strings.HasPrefix(name, "runtime.") ||
(loadingRuntimePkg && strings.HasPrefix(name, "type.")) {
- if bi := goobj.BuiltinIdx(name, v); bi != -1 {
+ if bi := goobj.BuiltinIdx(name, int(osym.ABI())); bi != -1 {
// This is a definition of a builtin symbol. Record where it is.
l.builtinSyms[bi] = gi
}