ctxt.Textp = textp
}
-func (ctxt *Link) loadlibfull() {
+func (ctxt *Link) loadlibfull(symGroupType []sym.SymKind) {
// Load full symbol contents, resolve indexed references.
ctxt.loader.LoadFull(ctxt.Arch, ctxt.Syms)
}
}
+ // For now, overwrite symbol type with its "group" type, as dodata
+ // expected. Once we converted dodata, this will probably not be
+ // needed.
+ for i, t := range symGroupType {
+ if t != sym.Sxxx {
+ s := ctxt.loader.Syms[i]
+ if s == nil {
+ panic(fmt.Sprintf("nil sym for symGroupType t=%s entry %d", t.String(), i))
+ }
+ s.Type = t
+ }
+ }
+ symGroupType = nil
+
if ctxt.Debugvlog > 1 {
// loadlibfull is likely a good place to dump.
// Only dump under -v=2 and above.
bench.Start("dodata")
ctxt.dodata2(symGroupType)
bench.Start("loadlibfull")
- ctxt.loadlibfull() // XXX do it here for now
+ ctxt.loadlibfull(symGroupType) // XXX do it here for now
bench.Start("address")
order := ctxt.address()
bench.Start("dwarfcompress")