readelf: Accept version 8 .gdb_index section format.
authorMark Wielaard <mjw@redhat.com>
Mon, 18 Mar 2013 12:54:50 +0000 (13:54 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 19 Mar 2013 10:44:40 +0000 (11:44 +0100)
Version 8 just indicates that if the .gdb_index was generated by the gold
linker it correctly includes TUs for symbols. http://sourceware.org/PR15021

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/readelf.c

index 2275c5c..0781177 100644 (file)
@@ -1,3 +1,7 @@
+2013-03-18  Mark Wielaard  <mjw@redhat.com>
+
+       * readelf.c (print_gdb_index_section): Accept version 8.
+
 2013-03-01  Mark Wielaard  <mjw@redhat.com>
 
        * findtextrel.c (process_file): Release ELF and close file when not
index c04cd20..9c7880d 100644 (file)
@@ -1,5 +1,5 @@
 /* Print information from ELF file in human-readable form.
-   Copyright (C) 1999-2012 Red Hat, Inc.
+   Copyright (C) 1999-2013 Red Hat, Inc.
    This file is part of elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -7272,8 +7272,10 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
   // The only difference between version 4 and version 5 is the
   // hash used for generating the table.  Version 6 contains symbols
-  // for inlined functions, older versions didn't.
-  if (vers < 4 || vers > 7)
+  // for inlined functions, older versions didn't.  Version 7 adds
+  // symbol kinds.  Version 8 just indicates that it correctly includes
+  // TUs for symbols.
+  if (vers < 4 || vers > 8)
     {
       printf (gettext ("  unknown version, cannot parse section\n"));
       return;