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
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:
Code-Review: +2 by Cherry Mui, +1 by Michael Pratt
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI