[dev.link] cmd/link: dostrdata and fieldtrack with new syms

Move the wavefront past fieldtrack and dostrdata.

Change-Id: Ia327ece0202e24031fec7e1f70b40e15fbb4f728
Reviewed-on: https://go-review.googlesource.com/c/go/+/219226
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Jeremy Faller 2020-02-12 17:20:00 -05:00
parent 112a7cb82c
commit 860f12a2fc
8 changed files with 67 additions and 83 deletions

View file

@ -423,7 +423,6 @@ func (l *Loader) IsExternal(i Sym) bool {
return l.isExtReader(r)
}
func (l *Loader) isExtReader(r *oReader) bool {
return r == l.extReader
}
@ -1708,7 +1707,7 @@ func (l *Loader) LoadFull(arch *sys.Arch, syms *sym.Symbols) {
// ExtractSymbols grabs the symbols out of the loader for work that hasn't been
// ported to the new symbol type.
func (l *Loader) ExtractSymbols(syms *sym.Symbols) {
func (l *Loader) ExtractSymbols(syms *sym.Symbols, rp map[*sym.Symbol]*sym.Symbol) {
// Add symbols to the ctxt.Syms lookup table. This explicitly skips things
// created via loader.Create (marked with versions less than zero), since
// if we tried to add these we'd wind up with collisions. We do, however,
@ -1731,6 +1730,13 @@ func (l *Loader) ExtractSymbols(syms *sym.Symbols) {
s.Version = int16(anonVerReplacement)
}
}
for i, s := range l.Reachparent {
if i == 0 {
continue
}
rp[l.Syms[i]] = l.Syms[s]
}
}
// allocSym allocates a new symbol backing.