diff options
| author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2024-09-04 18:30:35 +0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-09-04 18:23:49 +0000 |
| commit | 4fd73e5d4ca8c87efa127ee7a3290b1d0fdae313 (patch) | |
| tree | 454d18c4074ce87ae00638fb9e61f7058eb13cf8 /src/cmd/objdump | |
| parent | ad8b5f7fe91bdb0afc9dad72a0ba3ac46ce0167c (diff) | |
| download | go-4fd73e5d4ca8c87efa127ee7a3290b1d0fdae313.tar.xz | |
cmd: do not use notsha256
CL 402595 used notsha256 to prevent the compiler from depending on
cgo-based implementations of sha1 and sha256.
However, since CL 454836, cmd is built with CGO_ENABLED=0, which
will disable boringcrypto. Thus all usages of notsha256 is not necessary
anymore.
Updates #51940
Updates #64751
Change-Id: I503090f7a2efb5723e8a79523b143dc7cdb4edd0
Reviewed-on: https://go-review.googlesource.com/c/go/+/610596
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/objdump')
| -rw-r--r-- | src/cmd/objdump/objdump_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go index d256e59afe..103517641e 100644 --- a/src/cmd/objdump/objdump_test.go +++ b/src/cmd/objdump/objdump_test.go @@ -5,7 +5,7 @@ package main import ( - "cmd/internal/notsha256" + "cmd/internal/hash" "flag" "fmt" "internal/platform" @@ -126,7 +126,7 @@ func testDisasm(t *testing.T, srcfname string, printCode bool, printGnuAsm bool, goarch = f[1] } - hash := notsha256.Sum256([]byte(fmt.Sprintf("%v-%v-%v-%v", srcfname, flags, printCode, printGnuAsm))) + hash := hash.Sum32([]byte(fmt.Sprintf("%v-%v-%v-%v", srcfname, flags, printCode, printGnuAsm))) tmp := t.TempDir() hello := filepath.Join(tmp, fmt.Sprintf("hello-%x.exe", hash)) args := []string{"build", "-o", hello} |
