Skip to content

cmd/link: -buildmode=pie binaries fail to run on s390x #78171

@srinivas-pokala

Description

@srinivas-pokala

Go version

go version go1.27-devel_6614616b75 Fri Mar 13 21:05:19 2026 -0700 linux/s390x

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='0'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='s390x'
GOAUTH='netrc'
GOBIN='/root/go/bin'
GOCACHE='/root/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -march=z13 -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build853977300=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='s390x'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/root/go_compiler/dev/test/tt/go.mod'
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/root/go_compiler/dev/go_sa'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/root/go_compiler/dev/go_sa/pkg/tool/linux_s390x'
GOVCS=''
GOVERSION='go1.27-devel_6614616b75 Fri Mar 13 21:05:19 2026 -0700'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

Built a simple Go program using -buildmode=pie on linux/s390x
`package main

func main() {
println("hello world")
}
CGO_ENABLED=0 go build -buildmode=pie -o main main.go
`

What did you see happen?

root@t83lp35:~/go_compiler/dev/test/tt # ./main
-bash: ./main: No such file or directory

What did you expect to see?

hello world

Metadata

Metadata

Labels

BugReportIssues describing a possible bug in the Go implementation.FeatureRequestIssues asking for a new feature that does not need a proposal.FixPendingIssues that have a fix which has not yet been reviewed or submitted.arch-s390xIssues solely affecting the s390x architecture.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions