aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Hudson-Doyle <michael.hudson@canonical.com>2016-03-21 19:32:57 +1300
committerMichael Hudson-Doyle <michael.hudson@canonical.com>2016-03-21 06:56:51 +0000
commit49be1ebab49c0608a6944c98feebc118432c598e (patch)
treebcf59b0323e8f7471adcf96b0feb0f181404ddfc /src
parent70ef564e795dea06d37e5233fcf3182b231c31f0 (diff)
downloadgo-49be1ebab49c0608a6944c98feebc118432c598e.tar.xz
cmd/link: delete more unreachable code
Debugasm can never be set in cmd/link, so delete it and the code it enables. Change-Id: If828db0b09f1a9e512dc660ac2750657a769094c Reviewed-on: https://go-review.googlesource.com/20971 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/link/internal/ld/link.go1
-rw-r--r--src/cmd/link/internal/ld/objfile.go51
2 files changed, 0 insertions, 52 deletions
diff --git a/src/cmd/link/internal/ld/link.go b/src/cmd/link/internal/ld/link.go
index 9a96acc130..1b042ba1dc 100644
--- a/src/cmd/link/internal/ld/link.go
+++ b/src/cmd/link/internal/ld/link.go
@@ -166,7 +166,6 @@ type Link struct {
Goarm int32
Headtype int
Arch *LinkArch
- Debugasm int32
Debugvlog int32
Bso *obj.Biobuf
Windows int32
diff --git a/src/cmd/link/internal/ld/objfile.go b/src/cmd/link/internal/ld/objfile.go
index 6bf3d73a41..a049fcfe4a 100644
--- a/src/cmd/link/internal/ld/objfile.go
+++ b/src/cmd/link/internal/ld/objfile.go
@@ -104,7 +104,6 @@ package ld
import (
"bytes"
"cmd/internal/obj"
- "fmt"
"log"
"strconv"
"strings"
@@ -317,56 +316,6 @@ overwrite:
ctxt.Etextp = s
}
}
-
- if ctxt.Debugasm != 0 {
- fmt.Fprintf(ctxt.Bso, "%s ", s.Name)
- if s.Version != 0 {
- fmt.Fprintf(ctxt.Bso, "v=%d ", s.Version)
- }
- if s.Type != 0 {
- fmt.Fprintf(ctxt.Bso, "t=%d ", s.Type)
- }
- if s.Attr.DuplicateOK() {
- fmt.Fprintf(ctxt.Bso, "dupok ")
- }
- if s.Attr.NoSplit() {
- fmt.Fprintf(ctxt.Bso, "nosplit ")
- }
- fmt.Fprintf(ctxt.Bso, "size=%d value=%d", int64(s.Size), int64(s.Value))
- if s.Type == obj.STEXT {
- fmt.Fprintf(ctxt.Bso, " args=%#x locals=%#x", uint64(s.Args), uint64(s.Locals))
- }
- fmt.Fprintf(ctxt.Bso, "\n")
- var c int
- var j int
- for i := 0; i < len(s.P); {
- fmt.Fprintf(ctxt.Bso, "\t%#04x", uint(i))
- for j = i; j < i+16 && j < len(s.P); j++ {
- fmt.Fprintf(ctxt.Bso, " %02x", s.P[j])
- }
- for ; j < i+16; j++ {
- fmt.Fprintf(ctxt.Bso, " ")
- }
- fmt.Fprintf(ctxt.Bso, " ")
- for j = i; j < i+16 && j < len(s.P); j++ {
- c = int(s.P[j])
- if ' ' <= c && c <= 0x7e {
- fmt.Fprintf(ctxt.Bso, "%c", c)
- } else {
- fmt.Fprintf(ctxt.Bso, ".")
- }
- }
-
- fmt.Fprintf(ctxt.Bso, "\n")
- i += 16
- }
-
- var r *Reloc
- for i := 0; i < len(s.R); i++ {
- r = &s.R[i]
- fmt.Fprintf(ctxt.Bso, "\trel %d+%d t=%d %s+%d\n", int(r.Off), r.Siz, r.Type, r.Sym.Name, int64(r.Add))
- }
- }
}
func readref(ctxt *Link, f *obj.Biobuf, pkg string, pn string) {