[PATCH] readelf: Hook up -g, --section-groups to display the section groups.

Mark Wielaard mark@klomp.org
Wed Nov 29 23:14:00 GMT 2017


It was already possible to display the section groups using -a, but
the argp options didn't yet have an -g, --section-groups entry to
just display the section groups.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 src/ChangeLog | 4 ++++
 src/readelf.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index c56c323c..78def6ea 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-29  Mark Wielaard  <mark@klomp.org>
+
+	* readelf.c (argp_options): Add "section-groups", 'g'.
+
 2017-11-21  Mark Wielaard  <mark@klomp.org>
 
 	* readelf.c (attr_callback): Print attribute name and form in error
diff --git a/src/readelf.c b/src/readelf.c
index a9168d1e..82fc7b6f 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -98,6 +98,7 @@ static const struct argp_option options[] =
   { "program-headers", 'l', NULL, 0, N_("Display the program headers"), 0 },
   { "segments", 'l', NULL, OPTION_ALIAS | OPTION_HIDDEN, NULL, 0 },
   { "relocs", 'r', NULL, 0, N_("Display relocations"), 0 },
+  { "section-groups", 'g', NULL, 0, N_("Display the section groups"), 0 },
   { "section-headers", 'S', NULL, 0, N_("Display the sections' headers"), 0 },
   { "sections", 'S', NULL, OPTION_ALIAS | OPTION_HIDDEN, NULL, 0 },
   { "symbols", 's', "SECTION", OPTION_ARG_OPTIONAL,
-- 
2.14.3



More information about the Elfutils-devel mailing list