patchelf icon indicating copy to clipboard operation
patchelf copied to clipboard

Fix alignment problem when rewriting sections

Open pablogsal opened this issue 1 year ago • 1 comments

After commit ac212d0e6fb8b741e5a5e9ea61091149103f401c 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.

pablogsal avatar Sep 05 '24 17:09 pablogsal

I think this fixes #492.

lkollar avatar Sep 09 '24 14:09 lkollar

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?

boegel avatar Oct 16 '24 08:10 boegel