1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:50:05 -07:00

cmd/link: make sure we're hashing __.PKGDEF in genhash

This is currently always the case because loadobjfile complains if
it's not, but that will be changed soon.

Updates #24512.

Change-Id: I262daca765932a0f4cea3fcc1cc80ca90de07a59
Reviewed-on: https://go-review.googlesource.com/102280
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Matthew Dempsky 2018-03-23 13:12:07 -07:00
parent 6f47fa2d6c
commit 946af1b658

View File

@ -731,6 +731,10 @@ func genhash(ctxt *Link, lib *sym.Library) {
Errorf(nil, "%s: short read on archive file symbol header", lib.File)
return
}
if arhdr.name != pkgdef {
Errorf(nil, "%s: missing package data entry", lib.File)
return
}
h := sha1.New()