1
0
mirror of https://github.com/golang/go synced 2024-11-15 00:40:31 -07:00
The Go programming language
Go to file
Cherry Mui 27603028eb cmd/internal/obj/x86: make SEH symbols content-addressable
Currently, the SEH symbol is defined as an aux symbol of the
function symbol, without adding to ctxt.Data. Each function has
its own SEH symbol. As there are a lot of duplications of the
SEH symbol contents, currently a Go object file may contain many
copies of identical SEH symbols. They are deduplicated at link
time. But it does make the linker do redundant work, and make it
hard to reason about the SEH symbol writing in the object file
writer, and its resolution in the linker. In fact, in the object
file writer, the same SEH symbol may be added to the ctxt.defs
multiple times (as it is the aux of multiple function symbols),
which is not expected.

In fact, "aux symbol" is just a mechanism to associate auxiliary
data to another symbol. The auxiliary data symbol itself can be an
ordinary data symbol, even a content-addressable symbol. Define
the SEH symbol as a conntent-addressable symbol and add it to
ctxt.Data. This way there is only one definition of each unique
SEH symbol, which can be the aux of many functions.

While here, add a check to ensure that we add a symbol at most
once to the defs list.

Change-Id: Ie7a0cf02ca114060423e025931b30de97ca330fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/585656
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-05-15 14:41:10 +00:00
.github .github: improve formatting of the telemetry proposal template 2024-05-07 19:58:26 +00:00
api slices: add Chunk 2024-05-10 17:28:50 +00:00
doc cmd/go: add support for godebug lines in go.mod and go.work 2024-05-15 13:52:10 +00:00
lib/time lib/time: use consistent directory in mkzip usage message 2024-03-04 17:32:07 +00:00
misc misc/wasm: drop wasmtime < 14 support 2024-04-11 17:09:10 +00:00
src cmd/internal/obj/x86: make SEH symbols content-addressable 2024-05-15 14:41:10 +00:00
test cmd/compile/internal/ssa: combine more shift and masking on PPC64 2024-05-15 13:27:41 +00:00
.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 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.