Go version
go version go1.25.5 X:nodwarf5 linux/amd64
Output of go env in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/res/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/res/.config/go/env'
GOEXE=''
GOEXPERIMENT='nodwarf5'
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1033279940=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/home/res/.local/share/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/res/.local/share/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/res/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.25.5 X:nodwarf5'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
Using the same example code listed on #75253 on both linux/386 and linux/amd64
- Build a single shared library
- Build a cgo application that links against that library
- Remove the cache directory (
~/.cache/go-build/)
- Build the same cgo application again using the same shared library
What did you see happen?
The .note.go.buildid and subsequently the .note.gnu.build-id sections of the ELF file will be different.
What did you expect to see?
Given the same library, source files, build path, and build arguments that the output binary should be the same.
Go version
go version go1.25.5 X:nodwarf5 linux/amd64
Output of
go envin your module/workspace:What did you do?
Using the same example code listed on #75253 on both linux/386 and linux/amd64
~/.cache/go-build/)What did you see happen?
The
.note.go.buildidand subsequently the.note.gnu.build-idsections of the ELF file will be different.What did you expect to see?
Given the same library, source files, build path, and build arguments that the output binary should be the same.