]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdwfl: Try opening files all installed compression libraries.
authorMark Wielaard <mjw@redhat.com>
Fri, 22 Feb 2013 22:42:59 +0000 (23:42 +0100)
committerMark Wielaard <mjw@redhat.com>
Fri, 22 Feb 2013 22:42:59 +0000 (23:42 +0100)
rhbz #909481. When a compression library wasn't installed libdwfl would
not try the next compression library for opening a file. Retry with the
next available compression library if a previous one isn't installed. Also
disable tests that depend on a particular compression library
(run-readelf-s.sh and run-dwflsyms.sh) if that library isn't installed.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdwfl/ChangeLog
libdwfl/open.c
tests/ChangeLog
tests/Makefile.am

index 1311dea63a84db83f11b699fa06acd9c547521e5..78139ba503e9501754627deebbc2fea2fcf73367 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-22  Mark Wielaard  <mjw@redhat.com>
+
+       * open.c (__libdw_gunzip,__libdw_bunzip2,__libdw_unlzma): Define
+       as DWFL_E_BADELF when not used.
+
 2013-02-10  Mark Wielaard  <mjw@redhat.com>
 
        * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in
index 7dd5b520f52752d4961f697eb23389738191e38f..40aac38801ef5fc2c5a29a0179fed0fcb3fcc8d3 100644 (file)
 #include <unistd.h>
 
 #if !USE_ZLIB
-# define __libdw_gunzip(...)   false
+# define __libdw_gunzip(...)   DWFL_E_BADELF
 #endif
 
 #if !USE_BZLIB
-# define __libdw_bunzip2(...)  false
+# define __libdw_bunzip2(...)  DWFL_E_BADELF
 #endif
 
 #if !USE_LZMA
-# define __libdw_unlzma(...)   false
+# define __libdw_unlzma(...)   DWFL_E_BADELF
 #endif
 
 /* Consumes and replaces *ELF only on success.  */
index c1e0ef96b601ffc4f8ec396dd81eef8184209b2d..d181cd567866d7adc4f8bcc4a6d1fd0ef99c8a6a 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-22  Mark Wielaard  <mjw@redhat.com>
+
+       * Makefile.am (TESTS): Remove run-readelf-s.sh and run-dwflsyms.sh.
+       (LZMA): Add run-readelf-s.sh and run-dwflsyms.sh to TESTS.
+
 2013-02-15  Mark Wielaard  <mjw@redhat.com>
 
        * testfile-dwzstr.bz2: New testfile.
index 44b4e61bdaba55d28a1ccb345a782c3058870868..63184f80d05f71e4696f40364b342ec542700c7d 100644 (file)
@@ -83,7 +83,6 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
        run-test-flag-nobits.sh run-prelink-addr-test.sh \
        run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \
        run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
-       run-readelf-s.sh run-dwflsyms.sh \
        run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
        run-test-archive64.sh run-readelf-vmcoreinfo.sh \
        run-readelf-mixed-corenote.sh
@@ -93,6 +92,10 @@ check_PROGRAMS += msg_tst md5-sha1-test
 TESTS += msg_tst md5-sha1-test
 endif
 
+if LZMA
+TESTS += run-readelf-s.sh run-dwflsyms.sh
+endif
+
 if HAVE_LIBASM
 check_PROGRAMS += $(asm_TESTS)
 TESTS += $(asm_TESTS)