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

debugedit: support compressed debug sections #540

Conversation

dandedrick
Copy link

If -gz=zlib is used at compile time the debug sections will be zlib
compressed and need to be decompressed before interpretting. Without
this compressed data will blindly be used as if it were uncompressed
giving inconsistent results.

Support for handling compressed sections was added to elfutils in
version 0.165 so we only do this if we are on that version or newer.

If -gz=zlib is used at compile time the debug sections will be zlib
compressed and need to be decompressed before interpretting. Without
this compressed data will blindly be used as if it were uncompressed
giving inconsistent results.

Support for handling compressed sections was added to elfutils in
version 0.165 so we only do this if we are on that version or newer.
@dandedrick
Copy link
Author

In case it is interesting you can test that this fails with the current version of debugedit with the following:

echo "int main(){return 0;}" | gcc -o test.o -c -g -gz=zlib -x c - && /usr/lib/rpm/debugedit -d $(pwd) -b /usr/src/debug -i -l test.list test.o

@dandedrick
Copy link
Author

I've run into some odd issues that I think may be related to this change. I'm closing this for now while I do a bit deeper investigation.

@dandedrick dandedrick closed this Sep 12, 2018
@dandedrick
Copy link
Author

This change as it was would not return the .debug* sections to the compressed state. I'd like to see if I can make it leave the section in the same compressed state that it was at the start if I can.

@dandedrick
Copy link
Author

libelf has issues with writing modified compressed data out so that will have to be fixed first.

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

Successfully merging this pull request may close these issues.

None yet

1 participant