[go] cmd/compile: set alignment for all content-addressable symbols

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Feb 12, 2026, 12:27:40 PM (18 hours ago) Feb 12
to Ian Lance Taylor, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, Keith Randall, Keith Randall, Go LUCI, Carlos Amedee, Robert Griesemer, Matthew Dempsky, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
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-by: Keith Randall <k...@google.com>
Reviewed-by: Keith Randall <k...@golang.org>
Reviewed-by: Cherry Mui <cher...@google.com>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
Files:
  • M src/cmd/compile/internal/liveness/arg.go
  • M src/cmd/compile/internal/liveness/plive.go
  • M src/cmd/compile/internal/reflectdata/reflect.go
  • M src/cmd/compile/internal/ssagen/ssa.go
  • M src/cmd/compile/internal/staticdata/data.go
  • M src/cmd/compile/internal/staticinit/sched.go
  • M src/cmd/internal/obj/arm64/asm7.go
  • M src/cmd/internal/obj/objfile.go
  • M src/cmd/internal/obj/pcln.go
  • M src/cmd/internal/obj/sym.go
  • M src/cmd/internal/obj/x86/seh.go
Change size: M
Delta: 11 files changed, 29 insertions(+), 65 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Cherry Mui, +2 by Keith Randall, +1 by Keith Randall
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I2f049eee8f2463dd2b5e20d7c9a270ac32a31e50
Gerrit-Change-Number: 727920
Gerrit-PatchSet: 13
Gerrit-Owner: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-Reviewer: Matthew Dempsky <mat...@go.dev>
Gerrit-Reviewer: Robert Griesemer <g...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages