mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: remove Gotype and File fields from sym.Symbol
Remove the 'Gotype' field from sym.Symbol, as it is now no longer
used. Store the loader.Sym for a symbol as a field in sym.Symbol
("SymIdx"). Then remove sym.Symbol 'File' field, and replace the field
accesses in question with calls into the loader instead.
Change-Id: I01c5504425006b8d3fe77fac2b69a86e198c7a5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/230304
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
0612e78f0f
commit
43a85a39bf
5 changed files with 18 additions and 45 deletions
|
|
@ -2911,6 +2911,13 @@ func (ctxt *Link) loadlibfull(symGroupType []sym.SymKind) {
|
|||
}
|
||||
}
|
||||
|
||||
func symPkg(ctxt *Link, s *sym.Symbol) string {
|
||||
if s == nil {
|
||||
return ""
|
||||
}
|
||||
return ctxt.loader.SymPkg(loader.Sym(s.SymIdx))
|
||||
}
|
||||
|
||||
func (ctxt *Link) dumpsyms() {
|
||||
for _, s := range ctxt.loader.Syms {
|
||||
if s == nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue