cmd/link: buildinfo
was saved twice
#73731
Labels
binary-size
BugReport
Issues describing a possible bug in the Go implementation.
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.24.3 windows/amd64
Output of
go env
in your module/workspace:What did you do?
Write a
main.go
, then compile it to linux x64 binary.What did you see happen?
strings binary | grep command-line-arguments
, you'll see two duplicate results. In fact, the contents ofmodinfo
are saved twice, once in.go.buildinfo
and once in.rodata
, with exactly the same contents.debug.ReadBuildInfo()
uses the information in.rodata
, whiledebug/buildinfo.ReadFile()
uses the information in.go.buildinfo
.What did you expect to see?
Only save the same content once.
The text was updated successfully, but these errors were encountered: