commit | b3e3c339ff02ccd1cf76eb07513e4f9051a55333 | [log] [tgz] |
---|---|---|
author | Cherry Zhang <cherryyz@google.com> | Mon Jul 20 19:03:33 2020 -0400 |
committer | Cherry Zhang <cherryyz@google.com> | Thu Jul 30 18:37:08 2020 +0000 |
tree | ed106d500e3191d16dcaa6a4f789f4f1028dde93 | |
parent | 4a9237129198d2082f8346d162a011a341b757a6 [diff] |
[dev.link] cmd/internal/obj: trim trailing zeros for content hashing The symbol's data in the object file (sym.P) may already not contain trailing zeros (e,g, for [10]int{1}), but sometimes it does (e.g. for [10]int{1,0}). The linker can already handle this case. We just always trim the trailing zeros for content hashing, so it can deduplicate [10]int{1} and [10]int{1,0}. Note: in theory we could just trim the zeros in the symbol data as well. But currently the linker depends on reading symbol data for certain symbols (e.g. type symbol decoding), and trimming will complicates things in the linker. Change-Id: I9e90e41e6ac808b36855b0713a85e61c33bf093a Reviewed-on: https://go-review.googlesource.com/c/go/+/245717 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.