ELF LOAD segments creating holes in the process image on GNU/Linux
H.J. Lu
hjl.tools@gmail.com
Mon Jan 3 13:40:29 GMT 2022
On Mon, Jan 3, 2022 at 5:23 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> >> Ideally? p_offset, p_vaddr, p_filesz, p_memsz should all be multiples
> >> of the page size, to closer reflect what can actually be loaded.
> >>
> >> Then, for each LOAD segment, p_vaddr plus p_memsz should be equal to
> >> p_vaddr of the next LOAD segment.
> >
> > Filled with zeros?
>
> No, with file contents. We can't zero-fill at a sub-page granularity.
> There shouldn't be page-sized holes, definitely not for 4K-only targets.
Do you mean padding these segments with zeros in file?
--
H.J.
More information about the Binutils
mailing list