* readelf.c (dump_section): Also test for SHT_REL sections when producing
authorNick Clifton <nickc@redhat.com>
Tue, 13 Mar 2007 17:17:15 +0000 (17:17 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 13 Mar 2007 17:17:15 +0000 (17:17 +0000)
  the warning about unapplied relocs.

binutils/ChangeLog
binutils/readelf.c

index 361d7fddc18ed90807197a5fefa1cf139af806d7..ccbd2b9e0269b149fae82254f18e50288c558e4a 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-13  Nick Clifton  <nickc@redhat.com>
+
+       * readelf.c (dump_section): Also test for SHT_REL sections when
+       producing the warning about unapplied relocs.
+
 2007-03-07  Joseph Myers  <joseph@codesourcery.com>
 
        * configure.in (REPORT_BUGS_TEXI): Define to Texinfo version of
index 6d8f07fab3975307aa2ad19db64594dad60fb5c9..4cde91bfc7ec0ade95b3dcfb8c9faea3af3ed68d 100644 (file)
@@ -1788,7 +1788,7 @@ get_machine_name (unsigned e_machine)
     case EM_XC16X:             return "Infineon Technologies xc16x";
     case EM_CYGNUS_MEP:         return "Toshiba MeP Media Engine";
     default:
-      snprintf (buff, sizeof (buff), _("<unknown>: %x"), e_machine);
+      snprintf (buff, sizeof (buff), _("<unknown>: 0x%x"), e_machine);
       return buff;
     }
 }
@@ -7697,7 +7697,7 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
        relsec < section_headers + elf_header.e_shnum;
        ++relsec)
     {
-      if (relsec->sh_type != SHT_RELA
+      if ((relsec->sh_type != SHT_RELA && relsec->sh_type != SHT_REL)
          || SECTION_HEADER_INDEX (relsec->sh_info) >= elf_header.e_shnum
          || SECTION_HEADER (relsec->sh_info) != section
          || relsec->sh_size == 0