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]

FYI: readelf.c (print_gdb_index_section): Accept version 6.


Hi,

Just applied the following to accept a newer version number
for .gdb_index in readelf. No real change in the format, the updated
version is just a marker that there are more symbols in the index
available.

Cheers,

Mark
From 30bb714e7446d35d15cd53b3c794dd8ac08d0a29 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 21 Mar 2012 16:05:31 +0100
Subject: [PATCH] readelf.c (print_gdb_index_section): Accept version 6.

No changes in the format.  Version 6 contains symbols for inlined
functions, older versions didn't.
---
 src/ChangeLog |    4 ++++
 src/readelf.c |    5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index ff19b48..6281756 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-21  Mark Wielaard  <mjw@redhat.com>
+
+	* readelf.c (print_gdb_index_section): Accept version 6.
+
 2012-01-31  Mark Wielaard  <mjw@redhat.com>
 
 	* readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
diff --git a/src/readelf.c b/src/readelf.c
index 8876688..f9f56aa 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -7118,8 +7118,9 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
   printf (gettext (" Version:         %" PRId32 "\n"), vers);
 
   // The only difference between version 4 and version 5 is the
-  // hash used for generating the table.
-  if (vers < 4 || vers > 5)
+  // hash used for generating the table.  Version 6 contains symbols
+  // for inlined functions, older versions didn't.
+  if (vers < 4 || vers > 6)
     {
       printf (gettext ("  unknown version, cannot parse section\n"));
       return;
-- 
1.7.7.6


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