2008-07-15 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Jul 2008 18:48:34 +0000 (18:48 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Jul 2008 18:48:34 +0000 (18:48 +0000)
* objdump.c (load_debug_section): Initialize section_is_compressed
for gcc 3.4/ia64.
* readelf.c (load_debug_section): Likewise.

binutils/ChangeLog
binutils/objdump.c
binutils/readelf.c

index d0f96bfc2120130f6f9bc0c361797ee75b54a084..0fa3eff2556355825364b7b7f56bb8fc9fa0f14b 100644 (file)
@@ -1,3 +1,9 @@
+2008-07-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * objdump.c (load_debug_section): Initialize section_is_compressed 
+       for gcc 3.4/ia64.
+       * readelf.c (load_debug_section): Likewise.
+
 2008-07-12  Jie Zhang  <jie.zhang@analog.com>
 
        Revert
index c86903308b2dc2f25d446aa9dcd4921362721f2b..74a4198849db0fbcba189453372401736cf606fc 100644 (file)
@@ -2071,21 +2071,16 @@ load_debug_section (enum dwarf_section_display_enum debug, void *file)
   /* Locate the debug section.  */
   sec = bfd_get_section_by_name (abfd, section->uncompressed_name);
   if (sec != NULL)
-    {
-      section->name = section->uncompressed_name;
-      section_is_compressed = 0;
-    }
+    section->name = section->uncompressed_name;
   else
     {
       sec = bfd_get_section_by_name (abfd, section->compressed_name);
       if (sec != NULL)
-        {
-          section->name = section->compressed_name;
-          section_is_compressed = 1;
-        }
+       section->name = section->compressed_name;
     }
   if (sec == NULL)
     return 0;
+  section_is_compressed = section->name == section->compressed_name;
 
   /* Compute a bias to be added to offsets found within the DWARF debug
      information.  These offsets are meant to be relative to the start of
index 8a38db747af2d38b74e1ae53ef87d1d11ce52c94..7fe294819900ea9740632cbb5a1b892ac97eac53 100644 (file)
@@ -8580,21 +8580,16 @@ load_debug_section (enum dwarf_section_display_enum debug, void *file)
   /* Locate the debug section.  */
   sec = find_section (section->uncompressed_name);
   if (sec != NULL)
-    {
-      section->name = section->uncompressed_name;
-      section_is_compressed = 0;
-    }
+    section->name = section->uncompressed_name;
   else
     {
       sec = find_section (section->compressed_name);
       if (sec != NULL)
-        {
-          section->name = section->compressed_name;
-          section_is_compressed = 1;
-        }
+       section->name = section->compressed_name;
     }
   if (sec == NULL)
     return 0;
+  section_is_compressed = section->name == section->compressed_name;
 
   snprintf (buf, sizeof (buf), _("%s section data"), section->name);
   section->address = sec->sh_addr;