Emit GNU build IDs on Linux targets - #1230
Merged
Merged
Conversation
Linux distributions built here carry no .note.gnu.build-id, which makes them invisible to debuginfod: the protocol is keyed entirely on that ID, so gdb has nothing to ask with and no server can serve symbols for them. sha1 rather than uuid: it is derived from the linked content, so it does not affect build reproducibility. Refs astral-sh#522. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012cBi1GSsZj4PrnGw7mVMUB
Contributor
Author
|
We run debuginfod.pwndbg.re, a debuginfod server The one thing missing is the build ID itself, which is what this PR adds. Note |
Contributor
|
This is great. A validation that the build-id is included in the output binaries would be a good addition but that can be done as follow up. |
jjhelmus
added a commit
that referenced
this pull request
Aug 25, 2026
Require executables and shared libraries to contain a nonempty GNU build ID to support debuginfod. Follow up to #1230
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linux distributions built here carry no
.note.gnu.build-id. That makes theminvisible to debuginfod: the protocol is keyed entirely on that ID, so a debugger
reading one of these binaries has nothing to ask with, and no symbol server —
yours or anyone else's — ever receives a request. This adds
-Wl,--build-id=sha1totarget_ldflagsfor the Linux targets. Refs #522.sha1rather thanuuid: it is derived from the linked content, so it does notaffect build reproducibility.
What I measured
.note.gnu.build-idininstall_only_strippedartifacts:54c37326ccd9e6e2e10a1c0857b5977aecfdc103Two separate things, worth separating:
21cf744 ("Enable native builds on Linux aarch64"). Before it, aarch64 was
cross-compiled with a host toolchain; afterwards it uses the in-tree one, as
x86_64 always did.