aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/ld/lib.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2025-01-07 11:28:44 -0500
committerGopher Robot <gobot@golang.org>2025-02-13 12:34:30 -0800
commiteab8e987c067ca91ad4ed79b384d8a33494bbf39 (patch)
tree4d980ee4060c22c4e91789f455a2fe9d7d1ef6b4 /src/cmd/link/internal/ld/lib.go
parenta7e331e67105f1a8cc0236b7f3b1e6a3570dda27 (diff)
downloadgo-eab8e987c067ca91ad4ed79b384d8a33494bbf39.tar.xz
cmd: use cmd/internal/hash.New32 and Sum32 only
Do not use New16, New20, Sum16, Sum20 anymore. As of CL 641096, these are just wrappers around New32 and Sum32. Change call sites to use them directly. Change-Id: Icea91a77449f6839b903894997057ba404bd04e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/641076 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/link/internal/ld/lib.go')
-rw-r--r--src/cmd/link/internal/ld/lib.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index 2d8f964f35..b114ca2a3d 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1022,7 +1022,7 @@ func typeSymbolMangle(name string) string {
return name
}
if isType {
- hb := hash.Sum20([]byte(name[5:]))
+ hb := hash.Sum32([]byte(name[5:]))
prefix := "type:"
if name[5] == '.' {
prefix = "type:."
@@ -1035,7 +1035,7 @@ func typeSymbolMangle(name string) string {
if j == -1 || j <= i {
j = len(name)
}
- hb := hash.Sum20([]byte(name[i+1 : j]))
+ hb := hash.Sum32([]byte(name[i+1 : j]))
return name[:i+1] + base64.StdEncoding.EncodeToString(hb[:6]) + name[j:]
}