Set the "local" attribute on object file loader symbols during preload,
as opposed to the current strategy of only propagating the local attr
when we convert to sym.Symbols.
Change-Id: I18965e2fdaa9a0b9315d95466d17d9f41aa40a45
Reviewed-on: https://go-review.googlesource.com/c/go/+/224379
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
if osym.TopFrame() {
l.SetAttrTopFrame(gi, true)
}
+ if osym.Local() {
+ l.SetAttrLocal(gi, true)
+ }
if strings.HasPrefix(name, "go.itablink.") {
l.itablink[gi] = struct{}{}
}
name := strings.Replace(osym.Name, "\"\".", r.pkgprefix, -1)
v := abiToVer(osym.ABI, r.version)
r.syms[ndef+i] = l.LookupOrCreateSym(name, v)
+ if osym.Local() {
+ gi := r.syms[ndef+i]
+ l.SetAttrLocal(gi, true)
+ }
}
}