Fix a minor bug where it should use Textp2 instead of Textp. This
doesn't affect correctness. It just made the pre-allocation less
effective.
Change-Id: Ib3fa8ab3c64037e3582933970d051f278286353b
Reviewed-on: https://go-review.googlesource.com/c/go/+/232837
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
// merge tramps into Textp, keeping Textp in address order
if ntramps != 0 {
- newtextp := make([]loader.Sym, 0, len(ctxt.Textp)+ntramps)
+ newtextp := make([]loader.Sym, 0, len(ctxt.Textp2)+ntramps)
i := 0
for _, s := range ctxt.Textp2 {
for ; i < ntramps && ldr.SymValue(ctxt.tramps[i]) < ldr.SymValue(s); i++ {