From 55d22f74900cae2ff9444eb81b9084175606b5dc Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Tue, 21 Sep 2021 17:52:19 -0400 Subject: cmd/link: remove ABI aliases It is now gone. Change-Id: I59f68b324af706476695de2f291dd3aa5734e192 Reviewed-on: https://go-review.googlesource.com/c/go/+/351332 Trust: Cherry Mui Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: Than McIntosh --- src/cmd/link/internal/loader/loader.go | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/cmd/link/internal/loader/loader.go') diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go index 487559829f..dcc33b966b 100644 --- a/src/cmd/link/internal/loader/loader.go +++ b/src/cmd/link/internal/loader/loader.go @@ -307,7 +307,6 @@ type extSymPayload struct { const ( // Loader.flags FlagStrictDups = 1 << iota - FlagUseABIAlias ) func NewLoader(flags uint32, elfsetstring elfsetstringFunc, reporter *ErrorReporter) *Loader { @@ -2297,27 +2296,6 @@ func abiToVer(abi uint16, localSymVersion int) int { return v } -// ResolveABIAlias given a symbol returns the ABI alias target of that -// symbol. If the sym in question is not an alias, the sym itself is -// returned. -func (l *Loader) ResolveABIAlias(s Sym) Sym { - if l.flags&FlagUseABIAlias == 0 { - return s - } - if s == 0 { - return 0 - } - if l.SymType(s) != sym.SABIALIAS { - return s - } - relocs := l.Relocs(s) - target := relocs.At(0).Sym() - if l.SymType(target) == sym.SABIALIAS { - panic(fmt.Sprintf("ABI alias %s references another ABI alias %s", l.SymName(s), l.SymName(target))) - } - return target -} - // TopLevelSym tests a symbol (by name and kind) to determine whether // the symbol first class sym (participating in the link) or is an // anonymous aux or sub-symbol containing some sub-part or payload of -- cgit v1.3