mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
e925c4640d
commit
98989f2a74
9 changed files with 29 additions and 49 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue