Commit 665c3da3 authored by Matthew Dempsky's avatar Matthew Dempsky Committed by Brad Fitzpatrick

cmd/internal/ld: change string vars into constants where possible

Change-Id: Ib3d7928bbdba9358e68a326a53effe483ec208ea
Reviewed-on: https://go-review.googlesource.com/7061Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
parent 90e02e85
...@@ -36,9 +36,10 @@ const ( ...@@ -36,9 +36,10 @@ const (
SAR_HDR = 16 + 44 SAR_HDR = 16 + 44
) )
var ARMAG string = "!<arch>\n" const (
ARMAG = "!<arch>\n"
var ARFMAG string = "`\n" ARFMAG = "`\n"
)
type ArHdr struct { type ArHdr struct {
name string name string
......
...@@ -258,9 +258,10 @@ const ( ...@@ -258,9 +258,10 @@ const (
AssumeGoldLinker = 0 AssumeGoldLinker = 0
) )
var symname string = "__.GOSYMDEF" const (
symname = "__.GOSYMDEF"
var pkgname string = "__.PKGDEF" pkgname = "__.PKGDEF"
)
var cout *os.File var cout *os.File
......
...@@ -12,9 +12,10 @@ import ( ...@@ -12,9 +12,10 @@ import (
"strings" "strings"
) )
var startmagic string = "\x00\x00go13ld" const (
startmagic = "\x00\x00go13ld"
var endmagic string = "\xff\xffgo13ld" endmagic = "\xff\xffgo13ld"
)
func ldobjfile(ctxt *Link, f *Biobuf, pkg string, length int64, pn string) { func ldobjfile(ctxt *Link, f *Biobuf, pkg string, length int64, pn string) {
start := Boffset(f) start := Boffset(f)
......
...@@ -40,7 +40,7 @@ import ( ...@@ -40,7 +40,7 @@ import (
// Reading object files. // Reading object files.
var noname string = "<none>" const noname = "<none>"
var paramspace string = "FP" var paramspace string = "FP"
......
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