]> Cypherpunks repositories - gostls13.git/commit
cmd/link: use correct alignment for type descriptors on AIX
authorIan Lance Taylor <iant@golang.org>
Sat, 31 Jan 2026 03:06:19 +0000 (19:06 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 6 Feb 2026 23:30:41 +0000 (15:30 -0800)
commit9fd5a5fa7d9d629ded8d4685dcc5984268258edb
tree007004fcf954f1d95c887938637b3e628337c783
parent4fe1203111eeda8a38af4f2a4208e4d4de720c0d
cmd/link: use correct alignment for type descriptors on AIX

CL 724261 changed the linker to put all type descriptors that
are used for typelinks in a single list. This caused trouble on AIX when
linking externally, because the AIX linker aligns symbols individually,
rather than honoring the layout of the object file generated by the
internal linker.

I fixed internal linking problems with CL 740220,
but that just made things worse for the external linker.

This CL rolls back 740220, and adds commentary.
With this CL we force a smaller alignment for type descriptors,
use the same alignment for runtime.types and type:*,
and use a consistent size for runtime.types in all cases.

With this change all the type descriptor related code
passes again on AIX, except for the new TestTypePlacement test
which I will fix in a followup CL.

Fixes #77400

Change-Id: I9f25847eb0588001cb4ce453f211a655400d6a59
Reviewed-on: https://go-review.googlesource.com/c/go/+/740820
Reviewed-by: Michael Pratt <mpratt@google.com>
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/link/internal/ld/data.go
src/cmd/link/internal/ld/symtab.go
src/cmd/link/internal/ld/xcoff.go
src/runtime/type.go