be910bf2fd
In Mach-O object files, there are two kinds of relocations: "external" relocation, which targets a symbol, and "non-external" relocation, which targets a section. For targeting symbols not in the current object, we must use symbol-targeted relocations. For targeting symbols defined in the current object, for some relocation types, both kinds can be used. We currently use section-targeted relocations for R_ADDR targeting locally defined symbols. Modern Apple toolchain seems to prefer symbol-targeted relocations. Also, Apple's new linker, ld-prime, seems to not handle section- targeted relocations well in some cases. So this CL switches to always generate symbol-targeted relocations. This also simplifies the code. One exception is that DWARF tools seem to handle only section- targeted relocations. So generate those in DWARF sections. This CL supersedes CL 502616. Fixes #60694. For #61229. Change-Id: I3b74df64f21114635061bcd89114392b3a2d588b Reviewed-on: https://go-review.googlesource.com/c/go/+/503935 Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
go.env | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.md |
The Go Programming Language
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 4.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.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.