Commit 31a9e505 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/internal/obj: remove LSym.Etext

Use a local variable instead.

Passes toolstash -cmp.

Change-Id: I9623a40ff0d568f11afd1279b6aaa1c33eda644c
Reviewed-on: https://go-review.googlesource.com/20730Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent dd2ba0c7
...@@ -337,7 +337,6 @@ type LSym struct { ...@@ -337,7 +337,6 @@ type LSym struct {
Gotype *LSym Gotype *LSym
Autom *Auto Autom *Auto
Text *Prog Text *Prog
Etext *Prog
Pcln *Pcln Pcln *Pcln
P []byte P []byte
R []Reloc R []Reloc
......
...@@ -131,6 +131,7 @@ func flushplist(ctxt *Link, freeProgs bool) { ...@@ -131,6 +131,7 @@ func flushplist(ctxt *Link, freeProgs bool) {
// Ignore ctxt->plist boundaries. There are no guarantees there, // Ignore ctxt->plist boundaries. There are no guarantees there,
// and the assemblers just use one big list. // and the assemblers just use one big list.
var curtext *LSym var curtext *LSym
var etext *Prog
var text []*LSym var text []*LSym
for pl := ctxt.Plist; pl != nil; pl = pl.Link { for pl := ctxt.Plist; pl != nil; pl = pl.Link {
...@@ -228,7 +229,7 @@ func flushplist(ctxt *Link, freeProgs bool) { ...@@ -228,7 +229,7 @@ func flushplist(ctxt *Link, freeProgs bool) {
} }
s.Type = STEXT s.Type = STEXT
s.Text = p s.Text = p
s.Etext = p etext = p
curtext = s curtext = s
continue continue
...@@ -247,11 +248,11 @@ func flushplist(ctxt *Link, freeProgs bool) { ...@@ -247,11 +248,11 @@ func flushplist(ctxt *Link, freeProgs bool) {
} }
if curtext == nil { if curtext == nil {
etext = nil
continue continue
} }
s := curtext etext.Link = p
s.Etext.Link = p etext = p
s.Etext = p
} }
} }
...@@ -293,7 +294,6 @@ func flushplist(ctxt *Link, freeProgs bool) { ...@@ -293,7 +294,6 @@ func flushplist(ctxt *Link, freeProgs bool) {
linkpcln(ctxt, s) linkpcln(ctxt, s)
if freeProgs { if freeProgs {
s.Text = nil s.Text = nil
s.Etext = nil
} }
} }
......
...@@ -23,7 +23,7 @@ func TestSizeof(t *testing.T) { ...@@ -23,7 +23,7 @@ func TestSizeof(t *testing.T) {
_64bit uintptr // size on 64bit platforms _64bit uintptr // size on 64bit platforms
}{ }{
{Addr{}, 52, 80}, {Addr{}, 52, 80},
{LSym{}, 88, 152}, {LSym{}, 84, 144},
{Prog{}, 196, 288}, {Prog{}, 196, 288},
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment