From d23cd597aac567a048f4d87a7d6d993bf59ddffd Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Wed, 29 Apr 2020 17:53:40 -0400 Subject: [PATCH] [dev.link] cmd/link: remove sym.Symbols.Newsym No longer needed. Change-Id: If259a956bc8edb2eb94583b06840b52344cb84be Reviewed-on: https://go-review.googlesource.com/c/go/+/231037 Run-TryBot: Cherry Zhang TryBot-Result: Gobot Gobot Reviewed-by: Jeremy Faller --- src/cmd/link/internal/loader/loader.go | 6 ------ src/cmd/link/internal/sym/symbols.go | 5 ----- 2 files changed, 11 deletions(-) diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go index e4b8098a8a..7736ba9771 100644 --- a/src/cmd/link/internal/loader/loader.go +++ b/src/cmd/link/internal/loader/loader.go @@ -2347,12 +2347,6 @@ func (l *Loader) ExtractSymbols(syms *sym.Symbols) { i := l.Lookup(name, ver) return l.Syms[i] } - syms.Newsym = func(name string, ver int) *sym.Symbol { - i := l.newExtSym(name, ver) - s := l.allocSym(name, ver) - l.installSym(i, s) - return s - } } // allocSym allocates a new symbol backing. diff --git a/src/cmd/link/internal/sym/symbols.go b/src/cmd/link/internal/sym/symbols.go index 0d7b7e6a46..ff139fedff 100644 --- a/src/cmd/link/internal/sym/symbols.go +++ b/src/cmd/link/internal/sym/symbols.go @@ -43,11 +43,6 @@ type Symbols struct { // Look up the symbol with the given name and version, returning nil // if it is not found. ROLookup func(name string, v int) *Symbol - - // Create a symbol with the given name and version. The new symbol - // is not added to the lookup table and is not dedup'd with existing - // symbols (if any). - Newsym func(name string, v int) *Symbol } func NewSymbols() *Symbols {