From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: ELF LOAD segments creating holes in the process image on GNU/Linux
Date: Mon, 3 Jan 2022 05:40:29 -0800 [thread overview]
Message-ID: <CAMe9rOrn6Xt5gvb07cbRjdmTKV=QYBa5v9PjWYNJr+JvGG8-dA@mail.gmail.com> (raw)
In-Reply-To: <87mtkdhs11.fsf@oldenburg.str.redhat.com>
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.
prev parent reply other threads:[~2022-01-03 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 12:31 Florian Weimer
2022-01-03 12:45 ` H.J. Lu
2022-01-03 12:49 ` Florian Weimer
2022-01-03 13:04 ` H.J. Lu
2022-01-03 13:14 ` Florian Weimer
2022-01-03 13:18 ` H.J. Lu
2022-01-03 13:23 ` Florian Weimer
2022-01-03 13:40 ` H.J. Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOrn6Xt5gvb07cbRjdmTKV=QYBa5v9PjWYNJr+JvGG8-dA@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=fweimer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).