]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: remove LSym.RefIdx
authorCherry Zhang <cherryyz@google.com>
Tue, 13 Oct 2020 22:28:25 +0000 (18:28 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 13 Oct 2020 23:38:08 +0000 (23:38 +0000)
LSym.RefIdx was for the old object files. I should have deleted
it when I deleted old object file code.

Change-Id: I8294f43a1e7ba45b1d75e84cc83cbaf2cb32f025
Reviewed-on: https://go-review.googlesource.com/c/go/+/262077
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/sizeof_test.go

index 014c78dbfc1db3ecd23aa916ba95866ddf21fd00..f14b691802e7656d4e10d8cd1bbec733a895dd58 100644 (file)
@@ -395,7 +395,6 @@ type LSym struct {
        Type objabi.SymKind
        Attribute
 
-       RefIdx int // Index of this symbol in the symbol reference list.
        Size   int64
        Gotype *LSym
        P      []byte
@@ -405,7 +404,7 @@ type LSym struct {
 
        Pkg    string
        PkgIdx int32
-       SymIdx int32 // TODO: replace RefIdx
+       SymIdx int32
 }
 
 // A FuncInfo contains extra fields for STEXT symbols.
index b5e170c6945f37b2c4f9edc7b2a72123e3e69668..69e60473f50ac8ba626576b08a2e0c49a5f4e3d8 100644 (file)
@@ -21,7 +21,7 @@ func TestSizeof(t *testing.T) {
                _64bit uintptr     // size on 64bit platforms
        }{
                {Addr{}, 32, 48},
-               {LSym{}, 76, 128},
+               {LSym{}, 72, 120},
                {Prog{}, 132, 200},
        }