mirror of
https://github.com/golang/go
synced 2024-11-26 07:17:59 -07:00
cmd/link: make npkgsyms meaningful
npkgsyms always equals 1 currently.
Change-Id: Ie88bc273beaace12ec7432054ca7c151396e8e35
GitHub-Last-Rev: c5d3b12b88
GitHub-Pull-Request: golang/go#46988
Reviewed-on: https://go-review.googlesource.com/c/go/+/331929
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
d9244f8b64
commit
4957976b1a
@ -2209,7 +2209,6 @@ func (l *Loader) LoadSyms(arch *sys.Arch) {
|
|||||||
// Index 0 is invalid for symbols.
|
// Index 0 is invalid for symbols.
|
||||||
l.objSyms = make([]objSym, 1, symSize)
|
l.objSyms = make([]objSym, 1, symSize)
|
||||||
|
|
||||||
l.npkgsyms = l.NSym()
|
|
||||||
st := loadState{
|
st := loadState{
|
||||||
l: l,
|
l: l,
|
||||||
hashed64Syms: make(map[uint64]symAndSize, hashed64Size),
|
hashed64Syms: make(map[uint64]symAndSize, hashed64Size),
|
||||||
@ -2219,6 +2218,7 @@ func (l *Loader) LoadSyms(arch *sys.Arch) {
|
|||||||
for _, o := range l.objs[goObjStart:] {
|
for _, o := range l.objs[goObjStart:] {
|
||||||
st.preloadSyms(o.r, pkgDef)
|
st.preloadSyms(o.r, pkgDef)
|
||||||
}
|
}
|
||||||
|
l.npkgsyms = l.NSym()
|
||||||
for _, o := range l.objs[goObjStart:] {
|
for _, o := range l.objs[goObjStart:] {
|
||||||
st.preloadSyms(o.r, hashed64Def)
|
st.preloadSyms(o.r, hashed64Def)
|
||||||
st.preloadSyms(o.r, hashedDef)
|
st.preloadSyms(o.r, hashedDef)
|
||||||
|
Loading…
Reference in New Issue
Block a user