This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [patch 0/3] Live PIDs with deleted files by /dev/PID/mem
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 04 Mar 2014 11:51:36 +0100
- Subject: Re: [patch 0/3] Live PIDs with deleted files by /dev/PID/mem
On Mon, 2014-03-03 at 23:55 +0100, Jan Kratochvil wrote:
> On Mon, 03 Mar 2014 15:28:22 +0100, Mark Wielaard wrote:
> > First the elf_from_remote_memory used the p_align value to see calculate
> > the file offset and sizes of the segments in memory. But the dynamic
> > loader doesn't p_align, it uses the actual pagesize,
>
> The elfutils code really seems incorrect. ELF spec talks about p_align it is
> "congruency", not "alignment". The field name is just confusing.
Right. You mean the original code I assume. Or do you mean my patch?
The intention of "[PATCH 1/2] libdwfl: elf_from_remote_memory should use
pagesize, not p_align." (commit 48a539 on mjw/pending) is to do the
"congruence" test as described (plus some other sanity checks) and
adjust the alignment assumptions to how the dynamic linker does the
alignment on the pagesize to get all segment addresses and offsets
correct. I think with that patch, elf_from_remote_memory works as
intended.
Cheers,
Mark