Created attachment 12101
Patch adjusting offset honoring page alignment
In my test with the previous patch p_offset mod page_size indeed did not match p_vaddr mod page_size. However the tested binary (gzip) worked ok, but I see that it is not guaranteed to work everywhere.
This newer patch ensures that p_offset's alignment is kept.
Created attachment 12101
Patch adjusting offset honoring page alignment
In my test with the previous patch p_offset mod page_size indeed did not match p_vaddr mod page_size. However the tested binary (gzip) worked ok, but I see that it is not guaranteed to work everywhere.
This newer patch ensures that p_offset's alignment is kept.