1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:56:12 -07:00

cmd/internal/obj, cmd/link: bump magic string to go19ld

golang.org/cl/37231 changed the object file format, but forgot to bump
the version string.

Change-Id: I8351ec8ed55e65479006e7c0df20254d0e31015f
Reviewed-on: https://go-review.googlesource.com/37798
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Matthew Dempsky 2017-03-06 10:51:37 -08:00
parent ad74e450ca
commit 7c84dc79fd
2 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@
//
// The file format is:
//
// - magic header: "\x00\x00go17ld"
// - magic header: "\x00\x00go19ld"
// - byte 1 - version number
// - sequence of strings giving dependencies (imported packages)
// - empty string (marks end of sequence)
@ -31,7 +31,7 @@
// - data, the content of the defined symbols
// - sequence of defined symbols
// - byte 0xff (marks end of sequence)
// - magic footer: "\xff\xffgo17ld"
// - magic footer: "\xff\xffgo19ld"
//
// All integers are stored in a zigzag varint format.
// See golang.org/s/go12symtab for a definition.
@ -198,7 +198,7 @@ func WriteObjFile(ctxt *Link, b *bufio.Writer) {
w := newObjWriter(ctxt, b)
// Magic header
w.wr.WriteString("\x00\x00go17ld")
w.wr.WriteString("\x00\x00go19ld")
// Version
w.wr.WriteByte(1)
@ -249,7 +249,7 @@ func WriteObjFile(ctxt *Link, b *bufio.Writer) {
}
// Magic footer
w.wr.WriteString("\xff\xffgo17ld")
w.wr.WriteString("\xff\xffgo19ld")
}
// Symbols are prefixed so their content doesn't get confused with the magic footer.

View File

@ -17,7 +17,7 @@ package ld
//
// The file format is:
//
// - magic header: "\x00\x00go17ld"
// - magic header: "\x00\x00go19ld"
// - byte 1 - version number
// - sequence of strings giving dependencies (imported packages)
// - empty string (marks end of sequence)
@ -33,7 +33,7 @@ package ld
// - data, the content of the defined symbols
// - sequence of defined symbols
// - byte 0xff (marks end of sequence)
// - magic footer: "\xff\xffgo17ld"
// - magic footer: "\xff\xffgo19ld"
//
// All integers are stored in a zigzag varint format.
// See golang.org/s/go12symtab for a definition.
@ -127,8 +127,8 @@ import (
)
const (
startmagic = "\x00\x00go17ld"
endmagic = "\xff\xffgo17ld"
startmagic = "\x00\x00go19ld"
endmagic = "\xff\xffgo19ld"
)
var emptyPkg = []byte(`"".`)