]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: remove sym.Symbols.Newsym
authorCherry Zhang <cherryyz@google.com>
Wed, 29 Apr 2020 21:53:40 +0000 (17:53 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 30 Apr 2020 03:11:13 +0000 (03:11 +0000)
No longer needed.

Change-Id: If259a956bc8edb2eb94583b06840b52344cb84be
Reviewed-on: https://go-review.googlesource.com/c/go/+/231037
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/sym/symbols.go

index e4b8098a8a0fa375cbb979a578c3fc71891739a8..7736ba97715f5ef247daf3c3fe324d45614e4c2c 100644 (file)
@@ -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.
index 0d7b7e6a46d6edead39121948a779bc3a515c8a6..ff139fedff2ed096403c5f2b5c6431770a5a29aa 100644 (file)
@@ -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 {