diff --git a/src/cmd/internal/ld/go.go b/src/cmd/internal/ld/go.go index c50e82b60d..1aab4f9680 100644 --- a/src/cmd/internal/ld/go.go +++ b/src/cmd/internal/ld/go.go @@ -656,8 +656,10 @@ func deadcode() { if last == nil { Ctxt.Textp = nil + Ctxt.Etextp = nil } else { last.Next = nil + Ctxt.Etextp = last } for s := Ctxt.Allsym; s != nil; s = s.Allsym {