This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Support new 'h' core note item format for hidden fields


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.

 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.

 OK for master?

 Thanks,
 PM

 src/ChangeLog |    5 +++++
 src/readelf.c |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index e538a57..49fc728 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-30  Petr Machata  <pmachata@redhat.com>
+
+	* readelf.c (handle_core_item) <'h'>: New branch for handling
+	fields that shouldn't be displayed.
+
 2013-09-26  Petr Machata  <pmachata@redhat.com>
 
 	* readelf.c (handle_file_note): New function.
diff --git a/src/readelf.c b/src/readelf.c
index d1a5b68..96de30d 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -8169,6 +8169,9 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc,
       colno = WRAP_COLUMN;
       break;
 
+    case 'h':
+      break;
+
     default:
       error (0, 0, "XXX not handling format '%c' for %s",
 	     item->format, item->name);
-- 
1.7.6.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]