mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: fix up 'top frame' attribute in preload
Populate the 'top frame' attribute for function symbols during preload (needed for DWARF debug frame generation). Change-Id: If27836f51ebafa3c1c29b268a22d72d1b59b505a Reviewed-on: https://go-review.googlesource.com/c/go/+/220983 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
48c79db07f
commit
3fd7d78dec
1 changed files with 4 additions and 0 deletions
|
|
@ -1627,6 +1627,9 @@ func (l *Loader) preloadSyms(r *oReader, kind int) {
|
||||||
if !added {
|
if !added {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if osym.TopFrame() {
|
||||||
|
l.SetAttrTopFrame(gi, true)
|
||||||
|
}
|
||||||
if strings.HasPrefix(name, "go.itablink.") {
|
if strings.HasPrefix(name, "go.itablink.") {
|
||||||
l.itablink[gi] = struct{}{}
|
l.itablink[gi] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
@ -2021,6 +2024,7 @@ func (l *Loader) migrateAttributes(src Sym, dst *sym.Symbol) {
|
||||||
dst.Attr.Set(sym.AttrOnList, l.AttrOnList(src))
|
dst.Attr.Set(sym.AttrOnList, l.AttrOnList(src))
|
||||||
dst.Attr.Set(sym.AttrLocal, l.AttrLocal(src))
|
dst.Attr.Set(sym.AttrLocal, l.AttrLocal(src))
|
||||||
dst.Attr.Set(sym.AttrNotInSymbolTable, l.AttrNotInSymbolTable(src))
|
dst.Attr.Set(sym.AttrNotInSymbolTable, l.AttrNotInSymbolTable(src))
|
||||||
|
dst.Attr.Set(sym.AttrNoSplit, l.IsNoSplit(src))
|
||||||
dst.Attr.Set(sym.AttrVisibilityHidden, l.AttrVisibilityHidden(src))
|
dst.Attr.Set(sym.AttrVisibilityHidden, l.AttrVisibilityHidden(src))
|
||||||
dst.Attr.Set(sym.AttrDuplicateOK, l.AttrDuplicateOK(src))
|
dst.Attr.Set(sym.AttrDuplicateOK, l.AttrDuplicateOK(src))
|
||||||
dst.Attr.Set(sym.AttrShared, l.AttrShared(src))
|
dst.Attr.Set(sym.AttrShared, l.AttrShared(src))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue