diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go index 53684fd0f5..27d78c4ad8 100644 --- a/src/cmd/link/internal/ld/dwarf.go +++ b/src/cmd/link/internal/ld/dwarf.go @@ -1059,6 +1059,9 @@ func writelines(ctxt *Link, syms []*Symbol) ([]*Symbol, []*Symbol) { var pcfile Pciter var pcline Pciter for _, s := range ctxt.Textp { + if s.FuncInfo == nil { + continue + } epc = s.Value + s.Size epcs = s @@ -1078,10 +1081,6 @@ func writelines(ctxt *Link, syms []*Symbol) ([]*Symbol, []*Symbol) { } funcs = append(funcs, dsym) - if s.FuncInfo == nil { - continue - } - finddebugruntimepath(s) pciterinit(ctxt, &pcfile, &s.FuncInfo.Pcfile)