commit | a2fb5cd823f5223070c3cce741dd5b3879bac21b | [log] [tgz] |
---|---|---|
author | Austin Clements <austin@google.com> | Thu Jun 27 18:14:03 2019 -0400 |
committer | Austin Clements <austin@google.com> | Fri Jul 05 18:18:28 2019 +0000 |
tree | 83e0a091c279cbe766b70953c28c574743c16ca0 | |
parent | 7aac3436dde7f247e8602f49317c17563def89ab [diff] |
cmd/cgo: accept weak dynamic imports cgo produces dynamic imports for Go binaries by scanning the dynamic imports table of a binary produced by the system C compiler and linker. Currently, since it uses elf.File.ImportedSymbols, it only reads global symbols. Unfortunately, recent versions of lld emit weak symbol imports for several pthread symbols, which means the cgo tool doesn't emit dynamic imports for them, which ultimately causes linking of cgo binaries to fail. Fix this by using elf.File.DynamicSymbols instead and filtering down to both global and weak symbols. Fixes #31912. Change-Id: If346a7eca6733e3bfa2cccf74a9cda02a3e81d38 Reviewed-on: https://go-review.googlesource.com/c/go/+/184100 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@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.