]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: set alignment for all content-addressable symbols
authorIan Lance Taylor <iant@golang.org>
Mon, 8 Dec 2025 05:55:24 +0000 (21:55 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 12 Feb 2026 17:27:34 +0000 (09:27 -0800)
commit174c92bd7428b41b9b5b59274a83f387a12261c9
tree8af1f38f18ecccb8e2b67e3f812866d383a9177c
parentfbe55325ddce51a7fc099e1efb0d326e7a2e1ed8
cmd/compile: set alignment for all content-addressable symbols

There is nothing particularly special about content-addressable
symbols, it's just a place to start.

This reduces the size of the tailscaled binary by about 16K.
This happens mainly because before this CL the linker's symalign
function kicks in for all static composite literals and PCDATA symbols,
and gives them an alignment based on their size. If the size happens
to be a multiple of 32, it gets an alignment of 32.
That wastes space.

For #6853
For #36313

Change-Id: I2f049eee8f2463dd2b5e20d7c9a270ac32a31e50
Reviewed-on: https://go-review.googlesource.com/c/go/+/727920
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/liveness/arg.go
src/cmd/compile/internal/liveness/plive.go
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/staticdata/data.go
src/cmd/compile/internal/staticinit/sched.go
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/pcln.go
src/cmd/internal/obj/sym.go
src/cmd/internal/obj/x86/seh.go