Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding an RPATH makes it impossible to extract the GNU Build ID from a core dump #560

Open
calminghydra opened this issue Jul 9, 2024 · 0 comments
Labels

Comments

@calminghydra
Copy link

Adding an RPATH to an executable without an RPATH moves the elf note segment containing the GNU Build ID to the end of the file. This renders it impossible to extract the Build ID from a core dump as it is no longer loaded into process memory. This note segment corresponds to the section .note.gnu.build-id and is deliberately placed at the beginning of the elf file.
It is still contained in the binary and can be extracted with tools like readelf, but it will not be loaded into process memory and is therefore not part of a core dump.

I don't care about other elf notes, only this one.
Among other tools, gdb has debuginfod support and can download executables and debug symbols if the Build ID can be extracted from a core dump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant