+2016-01-08 Mark Wielaard <mjw@redhat.com>
+
+ * libdwfl_a_SOURCES: Unconditionally add gzip.c.
+ * linux-kernel-modules.c (vmlinux_suffixes): We always have at least
+ .gz support.
+ (try_kernel_name): Likewise.
+ (check_suffix): Likewise.
+ * open.c (decompress): Likewise.
+
2015-12-18 Mark Wielaard <mjw@redhat.com>
* dwfl_module_getdwarf.c (find_symtab): Uncompress symstr, xndx, sym
dwfl_segment_report_module.c \
link_map.c core-file.c open.c image-header.c \
dwfl_frame.c frame_unwind.c dwfl_frame_pc.c \
- linux-pid-attach.c linux-core-attach.c dwfl_frame_regs.c
+ linux-pid-attach.c linux-core-attach.c dwfl_frame_regs.c \
+ gzip.c
-if ZLIB
-libdwfl_a_SOURCES += gzip.c
-endif
if BZLIB
libdwfl_a_SOURCES += bzip2.c
endif
#define MODULE_SECT_NAME_LEN 32 /* Minimum any linux/module.h has had. */
-#if defined (USE_ZLIB) || defined (USE_BZLIB) || defined (USE_LZMA)
static const char *vmlinux_suffixes[] =
{
-#ifdef USE_ZLIB
".gz",
-#endif
#ifdef USE_BZLIB
".bz2",
#endif
".xz",
#endif
};
-#endif
/* Try to open the given file as it is or under the debuginfo directory. */
static int
}
}
-#if defined (USE_ZLIB) || defined (USE_BZLIB) || defined (USE_LZMA)
if (fd < 0)
for (size_t i = 0;
i < sizeof vmlinux_suffixes / sizeof vmlinux_suffixes[0];
}
}
}
-#endif
if (fd < 0)
{
return sizeof sfx - 1
TRY (".ko");
-#if USE_ZLIB
TRY (".ko.gz");
-#endif
#if USE_BZLIB
TRY (".ko.bz2");
#endif
-/* Decompression support for libdwfl: zlib (gzip) and/or bzlib (bzip2).
- Copyright (C) 2009 Red Hat, Inc.
+/* Decompression support for libdwfl: zlib (gzip), bzlib (bzip2) or lzma (xz).
+ Copyright (C) 2009, 2016 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
#include <unistd.h>
-#if !USE_ZLIB
-# define __libdw_gunzip(...) DWFL_E_BADELF
-#endif
-
#if !USE_BZLIB
# define __libdw_bunzip2(...) DWFL_E_BADELF
#endif
void *buffer = NULL;
size_t size = 0;
-#if USE_ZLIB || USE_BZLIB || USE_LZMA
const off_t offset = (*elf)->start_offset;
void *const mapped = ((*elf)->map_address == NULL ? NULL
: (*elf)->map_address + offset);
error = __libdw_bunzip2 (fd, offset, mapped, mapped_size, &buffer, &size);
if (error == DWFL_E_BADELF)
error = __libdw_unlzma (fd, offset, mapped, mapped_size, &buffer, &size);
-#endif
if (error == DWFL_E_NOERROR)
{
+2016-01-08 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Always unconditionally add
+ run-readelf-zdebug.sh and run-readelf-zdebug-rel.sh.
+
2015-12-16 Mark Wielaard <mjw@redhat.com>
* run-compress-test.sh: New test.
elfshphehdr run-lfs-symbols.sh run-dwelfgnucompressed.sh \
run-elfgetchdr.sh \
run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \
- run-compress-test.sh
+ run-compress-test.sh \
+ run-readelf-zdebug.sh run-readelf-zdebug-rel.sh
if !BIARCH
export ELFUTILS_DISABLE_BIARCH = 1
TESTS += run-readelf-s.sh run-dwflsyms.sh
endif
-if ZLIB
-TESTS += run-readelf-zdebug.sh run-readelf-zdebug-rel.sh
-endif
-
if HAVE_LIBASM
check_PROGRAMS += $(asm_TESTS)
TESTS += $(asm_TESTS)