Commit 61b9315d authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/internal/obj: remove LSym.Value

It is unused.

Passes toolstash -cmp.

Change-Id: I22ae2bb432ce6be377dea43cf018ffccb6e95f37
Reviewed-on: https://go-review.googlesource.com/20698Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent f11e4eb5
......@@ -333,7 +333,6 @@ type LSym struct {
Local bool
Args int32
Locals int32
Value int64
Size int64
Next *LSym
Gotype *LSym
......
......@@ -536,11 +536,11 @@ func aclass(ctxt *obj.Link, a *obj.Addr) int {
break
}
if s.Type == obj.SCONST {
ctxt.Instoffset = s.Value + a.Offset
ctxt.Instoffset = a.Offset
goto consize
}
ctxt.Instoffset = s.Value + a.Offset
ctxt.Instoffset = a.Offset
/* not sure why this barfs */
return C_LCON
......
......@@ -418,7 +418,7 @@ func writesym(ctxt *Link, b *Biobuf, s *LSym) {
if s.Nosplit != 0 {
fmt.Fprintf(ctxt.Bso, "nosplit ")
}
fmt.Fprintf(ctxt.Bso, "size=%d value=%d", int64(s.Size), int64(s.Value))
fmt.Fprintf(ctxt.Bso, "size=%d", s.Size)
if s.Type == STEXT {
fmt.Fprintf(ctxt.Bso, " args=%#x locals=%#x", uint64(s.Args), uint64(s.Locals))
if s.Leaf != 0 {
......
......@@ -120,7 +120,7 @@ func funcpctab(ctxt *Link, dst *Pcdata, func_ *LSym, desc string, valfunc func(*
if ctxt.Debugpcln != 0 {
fmt.Fprintf(ctxt.Bso, "%6x done\n", uint64(int64(func_.Text.Pc)+func_.Size))
}
addvarint(ctxt, dst, uint32((func_.Value+func_.Size-pc)/int64(ctxt.Arch.Minlc)))
addvarint(ctxt, dst, uint32((func_.Size-pc)/int64(ctxt.Arch.Minlc)))
addvarint(ctxt, dst, 0) // terminator
}
......
......@@ -652,11 +652,11 @@ func aclass(ctxt *obj.Link, a *obj.Addr) int {
break
}
if s.Type == obj.SCONST {
ctxt.Instoffset = s.Value + a.Offset
ctxt.Instoffset = a.Offset
goto consize
}
ctxt.Instoffset = s.Value + a.Offset
ctxt.Instoffset = a.Offset
/* not sure why this barfs */
return C_LCON
......
......@@ -23,7 +23,7 @@ func TestSizeof(t *testing.T) {
_64bit uintptr // size on 64bit platforms
}{
{Addr{}, 52, 80},
{LSym{}, 100, 168},
{LSym{}, 92, 160},
{Prog{}, 196, 288},
}
......
......@@ -124,7 +124,6 @@ func Linklookup(ctxt *Link, name string, v int) *LSym {
Name: name,
Type: 0,
Version: int16(v),
Value: 0,
Size: 0,
}
ctxt.Hash[SymVer{name, v}] = s
......
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