Commit 7c84dc79 authored by Matthew Dempsky's avatar Matthew Dempsky

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: default avatarAustin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent ad74e450
......@@ -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.
......
......@@ -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(`"".`)
......
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