aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/ld
diff options
context:
space:
mode:
authorGeorge Adams <georgeadams1995@gmail.com>2026-02-05 15:05:23 +0000
committerQuim Muntal <quimmuntal@gmail.com>2026-02-13 12:01:23 -0800
commit58bc91a9671f3aec46a7e3c1e55d1d0e303dfe4e (patch)
tree2af3f8c73798554441d53dc0b94a18f3045c5c1f /src/cmd/link/internal/ld
parent4dca8b3e619a321de36b99b6b514d9c01ef76e5e (diff)
downloadgo-58bc91a9671f3aec46a7e3c1e55d1d0e303dfe4e.tar.xz
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-on: https://go-review.googlesource.com/c/go/+/742342 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/link/internal/ld')
-rw-r--r--src/cmd/link/internal/ld/elf.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/cmd/link/internal/ld/elf.go b/src/cmd/link/internal/ld/elf.go
index 8cd9e9f1b4..1cb21926a6 100644
--- a/src/cmd/link/internal/ld/elf.go
+++ b/src/cmd/link/internal/ld/elf.go
@@ -1540,10 +1540,6 @@ func (ctxt *Link) doelf() {
dynamic.SetType(sym.SELFSECT)
}
- if ctxt.IsS390X() {
- // S390X uses .got instead of .got.plt
- gotplt = got
- }
thearch.ELF.SetupPLT(ctxt, ctxt.loader, plt, gotplt, dynamic.Sym())
// .dynamic table