]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: add Align field to LSym
authorIan Lance Taylor <iant@golang.org>
Thu, 4 Dec 2025 21:45:57 +0000 (13:45 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 11 Feb 2026 03:40:05 +0000 (19:40 -0800)
commit67d449c0a608ab6c9891bb9b16cc14016bde8848
tree5ef137528eb2726e1c6d40e5cf3aa18cc55db352
parent4f8aa414f0ff4af04df1554113178ee57959c706
cmd/internal/obj: add Align field to LSym

This will permit the compiler and assembler to specify the alignment
of symbols that they create.

Careful placement of the new field, plus rearranging an existing field,
means that LSym does not change size (as tested by TestSizeof).
The new alignment field is int16, permitting alignment up to 16384,
more than we ever need in practice. If necessary we could change the
field to uint8 and store the alignment as a power of two,
as is done in the linker.

This replaces the Align field in FuncInfo.

For #6853
For #36313

Change-Id: I421e8238ab57958fea8e4eab0649ce5288e7f92f
Reviewed-on: https://go-review.googlesource.com/c/go/+/727020
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/loong64/asm.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/riscv/obj.go
src/cmd/internal/obj/util.go