This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] Support new 'h' core note item format for hidden fields
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 01 Oct 2013 11:39:23 +0200
- Subject: Re: [PATCH] Support new 'h' core note item format for hidden fields
On Tue, 2013-10-01 at 00:08 +0200, Petr Machata wrote:
> Signed-off-by: Petr Machata <pmachata@redhat.com>
> ---
>
> The use case here is NT_ARM_HW_BREAK and NT_ARM_HW_WATCH core notes.
> These end in a 4-byte padding field. If that field is absent from the
> note description, readelf notices that we still have data left, and
> does another pass through the items. But we don't want to really show
> that field either, as it carries no useful information. Hence this.
If I understand correctly this is because this comment in
handle_core_items:
/* This set of items consumed a certain amount of the note's data.
If there is more data there, we have another unit of the same size.
Loop to print that out too. */
And it uses gelf_fsize on the item type to decide how big the consumed
data was. Which doesn't know about any padding. Right?
> I initially chose '\0' for that field, but handle_auxv_note uses that
> for fields that should be hidden if all zero, but displayed otherwise.
> That might be eventually useful for core note items as well.
'h' is nice for hidden, but would 'p' for padding be more apt?
> OK for master?
It looks OK, but I like to get this in together with the actual code
using it (it can still be a separate commit). Just to make sure that it
is actually used.
Thanks,
Mark