diff options
| author | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2017-04-19 15:30:08 +1200 |
|---|---|---|
| committer | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2017-04-28 20:01:54 +0000 |
| commit | d2a954517834104dfa55341202efba911b17e03d (patch) | |
| tree | 4e2211dc56b2861019497697c2f407067abe92e7 /src/cmd/internal/obj | |
| parent | 794d29a46f01b800b208bbc32f0ccb89b83c244d (diff) | |
| download | go-d2a954517834104dfa55341202efba911b17e03d.tar.xz | |
cmd/internal: remove SymKind values that are only checked for, never set
Change-Id: Id152767c033c12966e9e12ae303b99f38776f919
Reviewed-on: https://go-review.googlesource.com/40987
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/internal/obj')
| -rw-r--r-- | src/cmd/internal/obj/mips/asm0.go | 4 | ||||
| -rw-r--r-- | src/cmd/internal/obj/plist.go | 2 | ||||
| -rw-r--r-- | src/cmd/internal/obj/ppc64/asm9.go | 4 | ||||
| -rw-r--r-- | src/cmd/internal/obj/s390x/asmz.go | 3 |
4 files changed, 1 insertions, 12 deletions
diff --git a/src/cmd/internal/obj/mips/asm0.go b/src/cmd/internal/obj/mips/asm0.go index 39c4d4750b..cb0775b2b9 100644 --- a/src/cmd/internal/obj/mips/asm0.go +++ b/src/cmd/internal/obj/mips/asm0.go @@ -606,10 +606,6 @@ func (c *ctxt0) aclass(a *obj.Addr) int { if s == nil { break } - if s.Type == objabi.SCONST { - c.instoffset = a.Offset - goto consize - } c.instoffset = a.Offset if s.Type == objabi.STLSBSS { diff --git a/src/cmd/internal/obj/plist.go b/src/cmd/internal/obj/plist.go index fbc902696f..c8d282712b 100644 --- a/src/cmd/internal/obj/plist.go +++ b/src/cmd/internal/obj/plist.go @@ -162,7 +162,7 @@ func (ctxt *Link) Globl(s *LSym, size int64, flag int) { s.Set(AttrOnList, true) ctxt.Data = append(ctxt.Data, s) s.Size = size - if s.Type == 0 || s.Type == objabi.SXREF { + if s.Type == 0 { s.Type = objabi.SBSS } if flag&DUPOK != 0 { diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go index c3f0a0d187..8bfc667cff 100644 --- a/src/cmd/internal/obj/ppc64/asm9.go +++ b/src/cmd/internal/obj/ppc64/asm9.go @@ -810,10 +810,6 @@ func (c *ctxt9) aclass(a *obj.Addr) int { if s == nil { break } - if s.Type == objabi.SCONST { - c.instoffset = a.Offset - goto consize - } c.instoffset = a.Offset diff --git a/src/cmd/internal/obj/s390x/asmz.go b/src/cmd/internal/obj/s390x/asmz.go index df466d6d92..624d3b74ff 100644 --- a/src/cmd/internal/obj/s390x/asmz.go +++ b/src/cmd/internal/obj/s390x/asmz.go @@ -558,9 +558,6 @@ func (c *ctxtz) aclass(a *obj.Addr) int { break } c.instoffset = a.Offset - if s.Type == objabi.SCONST { - goto consize - } return C_SYMADDR |
