mirror of
https://github.com/golang/go
synced 2024-11-14 13:40:30 -07:00
cmd/compile: don't generate DWARF info for static vars
Static data symbols are compiler generated, not user symbols. The linker already does not include them in the final DWARF section. Don't generate the DWARF info in the first place. Change-Id: Id2ae36683bfc1ed60b9924b7305eae5e8aa14d80 Reviewed-on: https://go-review.googlesource.com/c/go/+/490817 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
39ca989b88
commit
3494a72600
@ -195,7 +195,7 @@ func dumpGlobal(n *ir.Name) {
|
||||
}
|
||||
types.CalcSize(n.Type())
|
||||
ggloblnod(n)
|
||||
if n.CoverageCounter() || n.CoverageAuxVar() {
|
||||
if n.CoverageCounter() || n.CoverageAuxVar() || n.Linksym().Static() {
|
||||
return
|
||||
}
|
||||
base.Ctxt.DwarfGlobal(base.Ctxt.Pkgpath, types.TypeSymName(n.Type()), n.Linksym())
|
||||
|
Loading…
Reference in New Issue
Block a user