The current parca-debuginfo buildid command only recognizes GNU build IDs stored in the .note.gnu.build-id ELF section. However, Go binaries store their build IDs in a different section called .note.go.buildid, which causes the tool to report "no build ID" even when a valid Go build ID is present.
Current Behavior
$ ./dist/parca-debuginfo buildid ./dist/parca-debuginfo
get Build ID for"./dist/parca-debuginfo": no build ID
However, the Go build ID is clearly present:
$ file ./dist/parca-debuginfo
./dist/parca-debuginfo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) ... Go BuildID=evv_okEzTtx4_0g2pG2aj/9GRgoRTKMyH5iavG2Hnz/FFkCniZ_jhbHSO9rY_9q/TFnE3V1_jFBYBfy-V8Xm ...
$ go tool buildid ./dist/parca-debuginfo
evv_okEzTtx4_0g2pG2aj/9GRgoRTKMyH5iavG2Hnz/FFkCniZ_jhbHSO9rY_9q/TFnE3V1_jFBYBfy-V8Xm
Root Cause
The GetBuildID() function in cmd/parca-debuginfo/main.go:518-528 only looks for build IDs in:
.note.gnu.build-id section (GNU build ID)
.notes section (fallback)
But Go binaries store their build IDs in .note.go.buildid section instead.
Proposed Solution
I would like to enhance the GetBuildID() function to also check for Go build IDs when GNU build IDs are not found. This would involve:
Adding support to read from .note.go.buildid section
Parsing the Go build ID format (which is different from GNU format)
Maintaining backward compatibility with existing GNU build ID support
Benefits
Better support for Go binaries in the Parca ecosystem
More comprehensive build ID detection
No breaking changes to existing functionality
Improved user experience for Go developers using parca-debuginfo
Would you be open to accepting a pull request that adds Go build ID support to the buildid
We used to support go build ID but the go core team advised against doing so and the compiler made it default to add a gnu build ID section in 1.23 or 1.24, so we decided to remove support for it. It’s also possible to make the compiler emit a gnu build ID in earlier versions via compiler flags (I don’t know them off the top of my head but we used them prior to them becoming default).
Activity
brancz commented on Nov 22, 2025
We used to support go build ID but the go core team advised against doing so and the compiler made it default to add a gnu build ID section in 1.23 or 1.24, so we decided to remove support for it. It’s also possible to make the compiler emit a gnu build ID in earlier versions via compiler flags (I don’t know them off the top of my head but we used them prior to them becoming default).
linrl3 commented on Nov 25, 2025
Get it. It sounds like the newer version of golang is good for this.