[go] cmd/link: support PIE on linux/s390x without cgo

0 views
Skip to first unread message

Quim Muntal (Gerrit)

unread,
Feb 13, 2026, 3:01:31 PMFeb 13
to George Adams, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, Go LUCI, Cherry Mui, Srinivas Pokala, golang-co...@googlegroups.com

Quim Muntal submitted the change

Change information

Commit message:
cmd/link: support PIE on linux/s390x without cgo

Enable PIE builds on linux/s390x when CGO is disabled by teaching
the linker to handle dynamic relocations against SDYNIMPORT
symbols.

This adds support for TLS_IE and handles R_CALL, R_PCRELDBL, and
R_ADDR relocations by generating the appropriate PLT/GOT entries
instead of rejecting them as unsupported.

Fixes #77449
Cq-Include-Trybots: luci.golang.try:gotip-linux-s390x
Change-Id: Ib6586780073fedbcbd42b9a2c554a99dd7386aa6
Reviewed-by: Cherry Mui <cher...@google.com>
Reviewed-by: Quim Muntal <quimm...@gmail.com>
Reviewed-by: Junyang Shao <shaoj...@google.com>
Files:
  • M src/cmd/dist/test.go
  • M src/cmd/link/internal/ld/elf.go
  • M src/cmd/link/internal/s390x/asm.go
  • M src/cmd/link/internal/s390x/obj.go
  • M src/internal/platform/supported.go
Change size: M
Delta: 5 files changed, 167 insertions(+), 24 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Cherry Mui, +1 by Junyang Shao, +1 by Quim Muntal
  • 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: Ib6586780073fedbcbd42b9a2c554a99dd7386aa6
Gerrit-Change-Number: 742342
Gerrit-PatchSet: 12
Gerrit-Owner: George Adams <georgea...@gmail.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
Gerrit-Reviewer: Quim Muntal <quimm...@gmail.com>
Gerrit-Reviewer: Srinivas Pokala <Pokala....@ibm.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages