]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/link/internal/loader: remove some dead code
authorThan McIntosh <thanm@google.com>
Wed, 8 Nov 2023 14:55:54 +0000 (09:55 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 8 Nov 2023 15:25:19 +0000 (15:25 +0000)
Get rid of a couple of unused methods in the loader and symbol
builder.

Change-Id: I3822891757dc56356295a9bc99545b725d485eac
Reviewed-on: https://go-review.googlesource.com/c/go/+/540260
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/symbolbuilder.go

index 617c6ba65a7c5a2dd6018b5e9dcd56ba587e4a47..5dd657b4d7fc7131a9c8bc8e0108f8654bd94d0b 100644 (file)
@@ -1316,14 +1316,6 @@ func (l *Loader) SetSymSect(i Sym, sect *sym.Section) {
        l.symSects[i] = sect.Index
 }
 
-// growSects grows the slice used to store symbol sections.
-func (l *Loader) growSects(reqLen int) {
-       curLen := len(l.symSects)
-       if reqLen > curLen {
-               l.symSects = append(l.symSects, make([]uint16, reqLen+1-curLen)...)
-       }
-}
-
 // NewSection creates a new (output) section.
 func (l *Loader) NewSection() *sym.Section {
        sect := new(sym.Section)
index 5a3e88b90eb09e2018d8ca0d11e49245b9c277d5..b9eaca7fb6fd61c9e41b6d5d1b90220dbb1831ea 100644 (file)
@@ -176,10 +176,6 @@ func (sb *SymbolBuilder) SetReachable(v bool) {
        sb.l.SetAttrReachable(sb.symIdx, v)
 }
 
-func (sb *SymbolBuilder) setReachable() {
-       sb.SetReachable(true)
-}
-
 func (sb *SymbolBuilder) ReadOnly() bool {
        return sb.l.AttrReadOnly(sb.symIdx)
 }