aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-03-31 03:53:41 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-03-31 03:53:55 -0700
commit0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd (patch)
treed340d7c5a7897eef99004fa960d0086f1801ce8a /binutils/readelf.c
parentb38f7f340bf021f9ad017cc88beddb9b0eaae06b (diff)
downloadgdb-0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd.zip
gdb-0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd.tar.gz
gdb-0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd.tar.bz2
Add --with-system-zlib in binutils
This patch adds --with-system-zlib and remove --with-zlib in binutils. * Makefile.am (ZLIB): New. (ZLIBINC): Likewise. (AM_CFLAGS): Add $(ZLIBINC). (readelf_LDADD): Add $(ZLIB). * configure.ac (AM_ZLIB): Removed. (zlibdir): New. AC_SUBST. (zlibinc): Likewise. Add --with-system-zlib. * readelf.c: Don't check HAVE_ZLIB_H to include <zlib.h>. (uncompress_section_contents): Don't check HAVE_ZLIB_H. * Makefile.in: Regenerated. * config.in: Likewise. * configure: Likewise.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index adf2a91..17d4fd4 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -43,9 +43,7 @@
#include "sysdep.h"
#include <assert.h>
#include <time.h>
-#ifdef HAVE_ZLIB_H
#include <zlib.h>
-#endif
#ifdef HAVE_WCHAR_H
#include <wchar.h>
#endif
@@ -11956,12 +11954,9 @@ dump_section_as_bytes (Elf_Internal_Shdr * section,
/* Uncompresses a section that was compressed using zlib, in place. */
static int
-uncompress_section_contents (unsigned char **buffer ATTRIBUTE_UNUSED,
- dwarf_size_type *size ATTRIBUTE_UNUSED)
+uncompress_section_contents (unsigned char **buffer,
+ dwarf_size_type *size)
{
-#ifndef HAVE_ZLIB_H
- return FALSE;
-#else
dwarf_size_type compressed_size = *size;
unsigned char * compressed_buffer = *buffer;
dwarf_size_type uncompressed_size;
@@ -12022,7 +12017,6 @@ uncompress_section_contents (unsigned char **buffer ATTRIBUTE_UNUSED,
/* Indicate decompression failure. */
*buffer = NULL;
return 0;
-#endif /* HAVE_ZLIB_H */
}
static int