Closed martijnthe closed 7 months ago
@sevaa
Again, no objections, the code looks sensible, the business case is alien to me, but who knows what do linkers out there emit.
Thanks @eliben for merging my PRs. Could you publish a new release to pypi? Thank you 🙏
An ELF note's name and data are always 4-byte aligned. However, when the containing segment has a larger alignment requirement, additional padding gets added after the last note. This was not being handled correctly by the
iter_notes
method. This PR fixes the problem by ensuring there is enough data left to at least parse a note header.I did not find another way to determine the "real size" of a note segment.
Fixes https://github.com/eliben/pyelftools/issues/535