On Tue, 2013-10-01 at 00:08 +0200, Petr Machata wrote:
Signed-off-by: Petr Machata <pmachata(a)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
/* 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
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.