[go] cmd/link: use correct alignment for type descriptors on AIX

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Feb 6, 2026, 6:30:46 PM (2 days ago) Feb 6
to Ian Lance Taylor, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Pratt, Cherry Mui, Go LUCI, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
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-by: Michael Pratt <mpr...@google.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
Files:
  • M src/cmd/link/internal/ld/data.go
  • M src/cmd/link/internal/ld/symtab.go
  • M src/cmd/link/internal/ld/xcoff.go
  • M src/runtime/type.go
Change size: M
Delta: 4 files changed, 55 insertions(+), 14 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Cherry Mui, +1 by Michael Pratt
  • 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: I9f25847eb0588001cb4ce453f211a655400d6a59
Gerrit-Change-Number: 740820
Gerrit-PatchSet: 5
Gerrit-Owner: Ian Lance Taylor <ia...@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: Michael Pratt <mpr...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages