]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: remove LSym.Value
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 15 Mar 2016 04:14:15 +0000 (21:14 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 16 Mar 2016 20:40:50 +0000 (20:40 +0000)
It is unused.

Passes toolstash -cmp.

Change-Id: I22ae2bb432ce6be377dea43cf018ffccb6e95f37
Reviewed-on: https://go-review.googlesource.com/20698
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/internal/obj/link.go
src/cmd/internal/obj/mips/asm0.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/pcln.go
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/sizeof_test.go
src/cmd/internal/obj/sym.go

index fd1cef7bcfa8f325c735b249c47c83651c2f9a2d..2e305478ebb9eda441a90612f5370508ff3aa944 100644 (file)
@@ -333,7 +333,6 @@ type LSym struct {
        Local  bool
        Args   int32
        Locals int32
-       Value  int64
        Size   int64
        Next   *LSym
        Gotype *LSym
index 9a71c18edfac1908dee7382365d75b39f5157f41..e9dd34e0a37ebc764a8c0c980d4a1ab39e1264b6 100644 (file)
@@ -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
index f82bbe598f45f0f918623241cf18ba1a2b22d775..dc64dad6cd1413dbaccf2be93dc004d6c3c29623 100644 (file)
@@ -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 {
index 3ed4ecfd8dbd89a46f506d29cf13aee94ff78738..9a2e3f3aa8d733b9d93d566b875b52ee111a18fa 100644 (file)
@@ -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
        }
 
index f5260b8d6888bac42b431c19f27fcb4fe01a7982..722d179e66dfb0112bad5a961838a583bbadd37d 100644 (file)
@@ -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
index d2945e158f0d1a18cd992bedc6e4498cbcdb6923..1c72a1e22ad9f135596be1da73bf976a8e25389a 100644 (file)
@@ -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},
        }
 
index 5f856e0bf71e688a68dbc214af1a29527bf7e38c..41623266f59d79687fa422507be324e2b1d1c640 100644 (file)
@@ -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