1
0
mirror of https://github.com/golang/go synced 2024-11-24 00:30:15 -07:00

cmd/link: use strings.Builder

Change-Id: I5780c3f26302fd5cf21e4a1f0bc1777abb658c82
Reviewed-on: https://go-review.googlesource.com/c/go/+/428290
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
cuiweixie 2022-09-04 20:09:40 +08:00 committed by Gopher Robot
parent 9c147cc617
commit ab0d057e64

View File

@ -7,7 +7,6 @@
package ld
import (
"bytes"
"cmd/internal/bio"
"cmd/internal/obj"
"cmd/internal/objabi"
@ -383,7 +382,7 @@ func Adddynsym(ldr *loader.Loader, target *Target, syms *ArchSyms, s loader.Sym)
}
func fieldtrack(arch *sys.Arch, l *loader.Loader) {
var buf bytes.Buffer
var buf strings.Builder
for i := loader.Sym(1); i < loader.Sym(l.NSym()); i++ {
if name := l.SymName(i); strings.HasPrefix(name, "go:track.") {
if l.AttrReachable(i) {