-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add tools and Debian packaging for parsing dlopen ELF notes #33
Conversation
I pushed another commit to rework the output to have more postprocessing. |
Merged into the first commit with Co-authored-by - also added CI, and added back a way to print a "soname priority" list, that I need for the Debian tool, behind a new option |
4d6ba70
to
850a114
Compare
I have no idea why it errors out in the CI, the string seems fine... also works locally, any idea? |
The bit
in the output makes me think that the else path here try:
if not isinstance(note_desc, str):
text = note_desc.decode('utf-8').rstrip('\0')
else:
text = note_desc
print(text)
except UnicodeDecodeError as e:
raise ValueError(f'{filename}: Invalid UTF-8 in .note.dlopen n_desc') from e is taken, but when I copy the above JSON into Emacs, it has a trailing null byte, which gives me the same error
Yes, unfortunately strings in Python can have null bytes, so stripping that might be what's needed. |
750a828
to
226230b
Compare
Indeed stripping that side of the if fixes the issue, thanks |
Co-authored-by: Zbigniew Jędrzejewski-Szmek <[email protected]>
Spec and implementation at systemd/systemd#32234