aboutsummaryrefslogtreecommitdiff
path: root/bfd/compress.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-03-19 12:14:56 +0000
committerNick Clifton <nickc@redhat.com>2015-03-19 12:14:56 +0000
commite2575e05e73c3b2f08a8b5f579a504ac6a45ad60 (patch)
tree139f07c5ba65fa1b904490b6775bea9b8702d77a /bfd/compress.c
parent590d1e9a30f9180af725673fa06ea74fe822d21b (diff)
downloadgdb-e2575e05e73c3b2f08a8b5f579a504ac6a45ad60.zip
gdb-e2575e05e73c3b2f08a8b5f579a504ac6a45ad60.tar.gz
gdb-e2575e05e73c3b2f08a8b5f579a504ac6a45ad60.tar.bz2
Fix building and testing dwarf debug section compression feature when zlib is not available.
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.
Diffstat (limited to 'bfd/compress.c')
-rw-r--r--bfd/compress.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/bfd/compress.c b/bfd/compress.c
index fa791de..de74d60 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -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