commit | 7795523910227cb6df3c91ebdb317037fc9ceb86 | [log] [tgz] |
---|---|---|
author | Cherry Zhang <cherryyz@google.com> | Mon Jun 01 18:53:58 2020 -0400 |
committer | Cherry Zhang <cherryyz@google.com> | Thu Jun 04 16:06:18 2020 +0000 |
tree | c6e479cf79e4363e14ab8d220e42c66bd2cc18af | |
parent | 4cc043d883b08b067234e5bdc771bef2ef962112 [diff] |
[dev.link] cmd/compile: use hash of export data as fingerprint Currently, the compiler generates a fingerprint for each package, which is used by the linker for index consistency check. When building plugin or shared object, currently the linker also generates a hash, by hashing the export data. At run time, when a package is referenced by multiple DSOs, this hash is compared to ensure consistency. It would be good if we can unify this two hashes. This way, the linker doesn't need to read the export data (which is intended for the compiler only, and is not always available for the linker). The export data hash is sufficient for both purposes. It is consistent with the current hash geneated by the linker. And the export data includes indices for exported symbols, so its hash can be used to catch index mismatches. Updates #33820. Change-Id: I2bc0d74930746f54c683a10dfd695d50ea3f5a38 Reviewed-on: https://go-review.googlesource.com/c/go/+/236118 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
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.