[dev.link] cmd/internal/goobj2: bump up version number

As we now have -go115newobj flag, it is better to use go115 in
the object file as well. And it already diverges from the go114
"new" object file format.

Change-Id: I315edf7524158b5c354393fe9a7ab9f6d7cc9808
Reviewed-on: https://go-review.googlesource.com/c/go/+/225458
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Cherry Zhang 2020-03-25 12:26:32 -04:00
parent c02cd04fe1
commit 6652a6cccc
2 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,7 @@ package goobj
import (
"bufio"
"bytes"
"cmd/internal/goobj2"
"cmd/internal/objabi"
"errors"
"fmt"
@ -506,7 +507,7 @@ func (r *objReader) parseObject(prefix []byte) error {
if err != nil {
return err
}
if bytes.Equal(p, []byte("\x00go114LD")) {
if bytes.Equal(p, []byte(goobj2.Magic)) {
r.readNew()
return nil
}

View File

@ -19,7 +19,7 @@ import (
// New object file format.
//
// Header struct {
// Magic [...]byte // "\x00go114LD"
// Magic [...]byte // "\x00go115ld"
// Flags uint32
// // TODO: Fingerprint
// Offsets [...]uint32 // byte offset of each block below
@ -153,7 +153,7 @@ type Header struct {
Offsets [NBlk]uint32
}
const Magic = "\x00go114LD"
const Magic = "\x00go115ld"
func (h *Header) Write(w *Writer) {
w.RawString(h.Magic)