[go] cmd/link: set the size of runtime.gcmask.* on AIX

0 views
Skip to first unread message

Ian Lance Taylor (Gerrit)

unread,
Apr 8, 2026, 8:52:05 PM (4 hours ago) Apr 8
to Cherry Mui, Keith Randall, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com
Attention needed from Cherry Mui and Keith Randall

Ian Lance Taylor has uploaded the change for review

Ian Lance Taylor would like Cherry Mui and Keith Randall to review this change.

Commit message

cmd/link: set the size of runtime.gcmask.* on AIX

Without this AIX does not set aside space for the gcmask variables.
This parallels the handling of runtime.gcbits.*, for which the call
to xcoffUpdateOuterSize happens in the loop over sym.ReadOnly in
allocateDataSections.

Tested on an AIX system on the GCC compile farm.

Fixes #78540
Change-Id: If5d4c6793912b86fd44a3b8bda48efa9dc17ac33

Change diff

diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go
index 773efb4..9424277 100644
--- a/src/cmd/link/internal/ld/data.go
+++ b/src/cmd/link/internal/ld/data.go
@@ -2049,6 +2049,9 @@
ldr.SetSymValue(gcmaskSym, int64(sect.Length))
ldr.SetSymSect(gcmaskSym, sect)
state.assignToSection(sect, sym.SGCMASK, sym.SNOPTRBSS)
+ if ctxt.HeadType == objabi.Haix {
+ xcoffUpdateOuterSize(ctxt, int64(sect.Length)-ldr.SymValue(gcmaskSym), sym.SGCMASK)
+ }

// Code coverage counters are assigned to the .noptrbss section.
// We assign them in a separate pass so that they stay aggregated
diff --git a/src/cmd/link/internal/ld/xcoff.go b/src/cmd/link/internal/ld/xcoff.go
index 38a72d9..d45074c 100644
--- a/src/cmd/link/internal/ld/xcoff.go
+++ b/src/cmd/link/internal/ld/xcoff.go
@@ -605,6 +605,8 @@
fsize = Rnd(fsize, int64(symalign(ldr, fft)))
tsize := ldr.SymSize(fft)
outerSymSize["runtime.pclntab"] = size - (fsize + tsize)
+ case sym.SGCMASK:
+ outerSymSize["runtime.gcmask.*"] = size
}
}

Change information

Files:
  • M src/cmd/link/internal/ld/data.go
  • M src/cmd/link/internal/ld/xcoff.go
Change size: XS
Delta: 2 files changed, 5 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Cherry Mui
  • Keith Randall
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: If5d4c6793912b86fd44a3b8bda48efa9dc17ac33
Gerrit-Change-Number: 764301
Gerrit-PatchSet: 1
Gerrit-Owner: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-Attention: Cherry Mui <cher...@google.com>
Gerrit-Attention: Keith Randall <k...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages