aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2021-09-21 09:45:34 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2021-09-27 20:59:14 +0000
commit8e34d779578736942c78f9857f5bb9b9025815c6 (patch)
tree0971ad1631da359d7ce137fdb18ed0a182ba2e46 /src/cmd/link
parentf0c79caa1398b6a840ec9406eb34b46a125ecb82 (diff)
downloadgo-8e34d779578736942c78f9857f5bb9b9025815c6.tar.gz
go-8e34d779578736942c78f9857f5bb9b9025815c6.zip
runtime, cmd/link: minor cleanup
Fix some comments. Adjust capitalization for initialisms. Use a println directly instead of emulating it. Change-Id: I0d8fa0eb39547e2db8113fd0358136285b86f16a Reviewed-on: https://go-review.googlesource.com/c/go/+/351462 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/link')
-rw-r--r--src/cmd/link/internal/ld/pcln.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/link/internal/ld/pcln.go b/src/cmd/link/internal/ld/pcln.go
index 56c4fe0b46..fede00586b 100644
--- a/src/cmd/link/internal/ld/pcln.go
+++ b/src/cmd/link/internal/ld/pcln.go
@@ -551,7 +551,7 @@ type pclnSetUint func(*loader.SymbolBuilder, *sys.Arch, int64, uint64) int64
// 1) the PC->func table.
// 2) The entry points in the func objects.
// 3) The funcdata.
-// (1) and (2) are handled in walkPCToFunc. (3) is handled in walkFuncdata.
+// (1) and (2) are handled in writePCToFunc. (3) is handled in writeFuncdata.
//
// After relocations, once we know where to write things in the output buffer,
// we execute the second pass, which is actually writing the data.
@@ -586,7 +586,7 @@ func (state *pclntab) generateFunctab(ctxt *Link, funcs []loader.Sym, inlSyms ma
}
// Write the data.
- writePcToFunc(ctxt, sb, funcs, startLocations, setAddr, (*loader.SymbolBuilder).SetUint)
+ writePCToFunc(ctxt, sb, funcs, startLocations, setAddr, (*loader.SymbolBuilder).SetUint)
writeFuncs(ctxt, sb, funcs, inlSyms, startLocations, cuOffsets, nameOffsets)
state.writeFuncData(ctxt, sb, funcs, inlSyms, startLocations, setAddr, (*loader.SymbolBuilder).SetUint)
}
@@ -611,7 +611,7 @@ func (state *pclntab) generateFunctab(ctxt *Link, funcs []loader.Sym, inlSyms ma
setAddr = (*loader.SymbolBuilder).SetAddrPlus
}
setUintNOP := func(*loader.SymbolBuilder, *sys.Arch, int64, uint64) int64 { return 0 }
- writePcToFunc(ctxt, sb, funcs, startLocations, setAddr, setUintNOP)
+ writePCToFunc(ctxt, sb, funcs, startLocations, setAddr, setUintNOP)
if !useSymValue {
// Generate relocations for funcdata when externally linking.
state.writeFuncData(ctxt, sb, funcs, inlSyms, startLocations, setAddr, setUintNOP)
@@ -687,10 +687,10 @@ func (state pclntab) calculateFunctabSize(ctxt *Link, funcs []loader.Sym) (int64
return size, startLocations
}
-// writePcToFunc writes the PC->func lookup table.
+// writePCToFunc writes the PC->func lookup table.
// This function walks the pc->func lookup table, executing callbacks
// to generate relocations and writing the values for the table.
-func writePcToFunc(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, startLocations []uint32, setAddr pclnSetAddr, setUint pclnSetUint) {
+func writePCToFunc(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, startLocations []uint32, setAddr pclnSetAddr, setUint pclnSetUint) {
ldr := ctxt.loader
var prevFunc loader.Sym
prevSect := ldr.SymSect(funcs[0])
@@ -775,8 +775,8 @@ func writeFuncs(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, inlSym
fi.Preload()
}
- // Note we skip the space for the entry value -- that's handled inn
- // walkPCToFunc. We don't write it here, because it might require a
+ // Note we skip the space for the entry value -- that's handled in
+ // writePCToFunc. We don't write it here, because it might require a
// relocation.
off := startLocations[i] + uint32(ctxt.Arch.PtrSize) // entry