diff options
| author | Cherry Mui <cherryyz@google.com> | 2021-09-21 14:35:37 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2021-09-22 13:50:24 +0000 |
| commit | 98989f2a74aa53e9ea64c41c94e66f02beceecc9 (patch) | |
| tree | 3d8aadfd4fbf72c9eee6185a9524a4f4dd0a4935 /src/cmd/internal/goobj/builtin.go | |
| parent | e925c4640d52587e6657bccc40899888b657e6df (diff) | |
| download | go-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/internal/goobj/builtin.go')
| -rw-r--r-- | src/cmd/internal/goobj/builtin.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/internal/goobj/builtin.go b/src/cmd/internal/goobj/builtin.go index e7d612aeb7..aa665fde99 100644 --- a/src/cmd/internal/goobj/builtin.go +++ b/src/cmd/internal/goobj/builtin.go @@ -4,6 +4,8 @@ package goobj +import "internal/buildcfg" + // Builtin (compiler-generated) function references appear // frequently. We assign special indices for them, so they // don't need to be referenced by name. @@ -27,7 +29,7 @@ func BuiltinIdx(name string, abi int) int { if !ok { return -1 } - if builtins[i].abi != abi { + if buildcfg.Experiment.RegabiWrappers && builtins[i].abi != abi { return -1 } return i |
