diff options
| author | Keith Randall <khr@golang.org> | 2021-06-09 19:30:16 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2021-07-21 21:04:15 +0000 |
| commit | a7a17f0ca86d252dc1ef20b5852c352ade5f8610 (patch) | |
| tree | fdc726eb6a687dfb988e927fdef467cd393bfaa1 /src/cmd/internal/obj/objfile.go | |
| parent | 897970688b326f7baa8ad8e3330fb552d94b0014 (diff) | |
| download | go-a7a17f0ca86d252dc1ef20b5852c352ade5f8610.tar.xz | |
[dev.typeparams] cmd/compile: introduce named gcshape types
Still 1-1 with real types, but now with their own names!
Shape types are implicitly convertible to (and convertible from)
the types they represent.
Change-Id: I0133a8d8fbeb369380574b075a32b3c987e314d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/335170
Run-TryBot: Keith Randall <khr@golang.org>
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/internal/obj/objfile.go')
| -rw-r--r-- | src/cmd/internal/obj/objfile.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go index 24fb5a19de..01466ea736 100644 --- a/src/cmd/internal/obj/objfile.go +++ b/src/cmd/internal/obj/objfile.go @@ -452,6 +452,11 @@ func (w *writer) contentHash(s *LSym) goobj.HashType { binary.LittleEndian.PutUint64(tmp[6:14], uint64(r.Add)) h.Write(tmp[:]) rs := r.Sym + if rs == nil { + fmt.Printf("symbol: %s\n", s) + fmt.Printf("relocation: %#v\n", r) + panic("nil symbol target in relocation") + } switch rs.PkgIdx { case goobj.PkgIdxHashed64: h.Write([]byte{0}) |
