From 5677c05971642f667630f088ef1f7317acaecff9 Mon Sep 17 00:00:00 2001 From: "zhuorong.lin" Date: Thu, 27 Oct 2022 10:32:48 -0700 Subject: [PATCH] elfutils: List flags meaning when running eu-readelf https://sourceware.org/bugzilla/show_bug.cgi?id=29571 Signed-off-by: zhuorong.lin --- src/readelf.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/readelf.c b/src/readelf.c index a206e60..e2182f7 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -321,6 +321,7 @@ static void dump_data (Ebl *ebl); static void dump_strings (Ebl *ebl); static void print_strings (Ebl *ebl); static void dump_archive_index (Elf *, const char *); +static void print_flaginfo(); enum dyn_idx { @@ -1369,10 +1370,20 @@ There are %zd section headers, starting at offset %#" PRIx64 ":\n\ } } } - + print_flaginfo(); fputc_unlocked ('\n', stdout); } +/* Print Flags information. */ +static void +print_flaginfo () +{ + puts("Key to Flags:"); + puts(" W (write), A (alloc), X (execute), M (merge), S (strings), I (info),"); + puts(" L (link order), O (extra OS processing required), G (group), T (TLS),"); + puts(" C (compressed), x (unknown), o (OS specific), E (exclude),\n"); + puts(" D (mbind), l (large), p (processor specific)"); +} /* Print the program header. */ static void -- 2.7.4