aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2023-11-08 09:55:54 -0500
committerThan McIntosh <thanm@google.com>2023-11-08 15:25:19 +0000
commit3f700ce4d2f9674e9091f5a33fa8860f9106d5c8 (patch)
tree68622172a1debffc902295e18c772058e568f71f /src
parent993ca35bd43bee9af2db700ac658b0fee896fa4d (diff)
downloadgo-3f700ce4d2f9674e9091f5a33fa8860f9106d5c8.tar.xz
cmd/link/internal/loader: remove some dead code
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>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/link/internal/loader/loader.go8
-rw-r--r--src/cmd/link/internal/loader/symbolbuilder.go4
2 files changed, 0 insertions, 12 deletions
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index 617c6ba65a..5dd657b4d7 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -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)
diff --git a/src/cmd/link/internal/loader/symbolbuilder.go b/src/cmd/link/internal/loader/symbolbuilder.go
index 5a3e88b90e..b9eaca7fb6 100644
--- a/src/cmd/link/internal/loader/symbolbuilder.go
+++ b/src/cmd/link/internal/loader/symbolbuilder.go
@@ -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)
}