Fix building and testing dwarf debug section compression feature when zlib is not...
authorNick Clifton <nickc@redhat.com>
Thu, 19 Mar 2015 12:14:56 +0000 (12:14 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 19 Mar 2015 12:14:56 +0000 (12:14 +0000)
PR gas/18087
gas/test * gas/i386/dw2-compress-1.d: Allow the test to pass regardless of
whether the .debug_info section was compressed on not.

bfd * compress.c (bfd_compress_section_contents): Do not define this
function if it is not used.

bfd/ChangeLog
bfd/compress.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/dw2-compress-1.d

index 0bc727d760816e10eb308f57aa9c871ccb955880..e1585910979312965aa39ae894fb1ada51130ba8 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-19  Nick Clifton  <nickc@redhat.com>
+
+       PR 18078
+       * compress.c (bfd_compress_section_contents): Do not define this
+       function if it is not used.
+
 2015-03-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        * compress.c (bfd_compress_section_contents): Make it static.
index fa791ded2e032981e9c19a2f67eca638f85ff68d..de74d60b1957ee7988d4f7e073e513d17994210a 100644 (file)
@@ -61,7 +61,6 @@ decompress_contents (bfd_byte *compressed_buffer,
   rc |= inflateEnd (&strm);
   return rc == Z_OK && strm.avail_out == 0;
 }
-#endif
 
 /* Compress data of the size specified in @var{uncompressed_size}
    and pointed to by @var{uncompressed_buffer} using zlib and store
@@ -78,10 +77,6 @@ bfd_compress_section_contents (bfd *abfd ATTRIBUTE_UNUSED,
                               bfd_byte *uncompressed_buffer ATTRIBUTE_UNUSED,
                               bfd_size_type uncompressed_size ATTRIBUTE_UNUSED)
 {
-#ifndef HAVE_ZLIB_H
-  bfd_set_error (bfd_error_invalid_operation);
-  return FALSE;
-#else
   uLong compressed_size;
   bfd_byte *compressed_buffer;
 
@@ -123,8 +118,8 @@ bfd_compress_section_contents (bfd *abfd ATTRIBUTE_UNUSED,
   sec->compress_status = COMPRESS_SECTION_DONE;
 
   return TRUE;
-#endif  /* HAVE_ZLIB_H */
 }
+#endif  /* HAVE_ZLIB_H */
 
 /*
 FUNCTION
index f814d363f4d485f75acfdc185453fe4ce98ecc34..4e3b1ecae1f528a82b7f8657dff17aff5b8a3a0e 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-19  Nick Clifton  <nickc@redhat.com>
+
+       PR gas/18087
+       * gas/i386/dw2-compress-1.d: Allow the test to pass regardless of
+       whether the .debug_info section was compressed on not.
+
 2015-03-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/18087
index c29a26cd33af36e9327f044207b6833adf94ae7f..da0c2b8e1e574a2d9da35afe7cabff08c0440231 100644 (file)
@@ -2,7 +2,7 @@
 #readelf: -w
 #name: DWARF2 debugging information 1
 
-Contents of the .zdebug_info section:
+Contents of the .*debug_info section:
 
   Compilation Unit @ offset 0x0:
    Length:        0x4e \(32-bit\)
This page took 0.032561 seconds and 4 git commands to generate.