1
0
mirror of https://github.com/golang/go synced 2024-11-19 02:54:42 -07:00

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

Change-Id: Ib3d7928bbdba9358e68a326a53effe483ec208ea
Reviewed-on: https://go-review.googlesource.com/7061
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Matthew Dempsky 2015-03-06 11:42:53 -08:00 committed by Brad Fitzpatrick
parent 90e02e8513
commit 665c3da33a
4 changed files with 13 additions and 10 deletions

View File

@ -36,9 +36,10 @@ const (
SAR_HDR = 16 + 44
)
var ARMAG string = "!<arch>\n"
var ARFMAG string = "`\n"
const (
ARMAG = "!<arch>\n"
ARFMAG = "`\n"
)
type ArHdr struct {
name string

View File

@ -258,9 +258,10 @@ const (
AssumeGoldLinker = 0
)
var symname string = "__.GOSYMDEF"
var pkgname string = "__.PKGDEF"
const (
symname = "__.GOSYMDEF"
pkgname = "__.PKGDEF"
)
var cout *os.File

View File

@ -12,9 +12,10 @@ import (
"strings"
)
var startmagic string = "\x00\x00go13ld"
var endmagic string = "\xff\xffgo13ld"
const (
startmagic = "\x00\x00go13ld"
endmagic = "\xff\xffgo13ld"
)
func ldobjfile(ctxt *Link, f *Biobuf, pkg string, length int64, pn string) {
start := Boffset(f)

View File

@ -40,7 +40,7 @@ import (
// Reading object files.
var noname string = "<none>"
const noname = "<none>"
var paramspace string = "FP"