aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2024-09-04 18:39:52 +0700
committerGopher Robot <gobot@golang.org>2024-09-04 18:25:21 +0000
commitf033bc1819d6f4830216b969d8e88aa5cb3dc82a (patch)
tree787d1d554c5d0d6b9d391ce6e3942405806a293e /src/cmd/internal/obj
parent4fd73e5d4ca8c87efa127ee7a3290b1d0fdae313 (diff)
downloadgo-f033bc1819d6f4830216b969d8e88aa5cb3dc82a.tar.xz
cmd: use 20 bytes hash when possible
CL 402595 changes all usages of 20 bytes hash to 32 bytes hash by using notsha256. However, since CL 454836, notsha256 is not necessary anymore, so this CL reverts those changes to 20 bytes hash using cmd/internal/hash package. Updates #51940 Updates #64751 Change-Id: Icb08d5a0d8032a3c4d050ff7b2298d31c483b88b Reviewed-on: https://go-review.googlesource.com/c/go/+/610597 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/internal/obj')
-rw-r--r--src/cmd/internal/obj/objfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go
index 6aa208a1c0..5ac15b8228 100644
--- a/src/cmd/internal/obj/objfile.go
+++ b/src/cmd/internal/obj/objfile.go
@@ -494,7 +494,7 @@ func contentHash64(s *LSym) goobj.Hash64Type {
// For now, we assume there is no circular dependencies among
// hashed symbols.
func (w *writer) contentHash(s *LSym) goobj.HashType {
- h := hash.New32()
+ h := hash.New20()
var tmp [14]byte
// Include the size of the symbol in the hash.