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

Fix alignment problem when rewriting sections #566

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

pablogsal
Copy link
Contributor

After commit ac212d0 the code to
rewrite alignment section has been changed to use the largest alignment
in the list of segments instead of the alignment that it's retrieved
using getPageSize().

Unfortunately the code didn't update the offset as well to keep the
invariant p_vaddr % alignment == p_offset % alignment.

Thank you!

Please do your best to include a regression test
so that the quality of future releases can be preserved.

After commit ac212d0 the code to
rewrite alignment section has been changed to use the largest alignment
in the list of segments instead of the alignment that it's retrieved
using getPageSize().

Unfortunately the code didn't update the offset as well to keep the
invariant p_vaddr % alignment == p_offset % alignment.
@lkollar
Copy link
Contributor

lkollar commented Sep 9, 2024

I think this fixes #492.

@boegel boegel mentioned this pull request Oct 7, 2024
3 tasks
@boegel
Copy link

boegel commented Oct 16, 2024

Without this change, we're running into the " ELF load command address/offset not properly aligned" issue reported #492 .

Are there any updates on getting this merged and a new version of patchelf released?

@Mic92 Mic92 merged commit 0e33894 into NixOS:master Nov 18, 2024
14 checks passed
@tkelman tkelman mentioned this pull request Feb 1, 2025
3 tasks
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.

4 participants