]> git.ipfire.org Git - thirdparty/elfutils.git/commit
support ZSTD compression algorithm
authorMartin Liska <mliska@suse.cz>
Tue, 29 Nov 2022 09:59:30 +0000 (10:59 +0100)
committerMartin Liska <mliska@suse.cz>
Fri, 23 Dec 2022 08:44:05 +0000 (09:44 +0100)
commita5b07cdf9c491fb7a4a16598c482c68b718f59b9
tree5d92b6cf6cb6840869010a0a222649068659a8c9
parentd868db89553bd9b994c24842441f5ad3c1ed0d84
support ZSTD compression algorithm

config/ChangeLog:

* libelf.pc.in: Add LIBLZSTD to Requires.private.

ChangeLog:

* configure.ac: Detect ZSTD streaming API.

libelf/ChangeLog:

* Makefile.am: Use zstd_LIBS.
* elf_compress.c:
(__libelf_compress): Split into ...
(__libelf_compress_zlib): ... this.
(do_zstd_cleanup): New.
(zstd_cleanup): New.
(__libelf_compress_zstd): New.
(__libelf_decompress): Switch in between zlib and zstd.
(__libelf_decompress_zlib): Renamed from __libelf_decompress.
(__libelf_decompress_zstd): New.
(__libelf_decompress_elf): Dispatch in between compression
algorithms.
(elf_compress): Likewise.
* elf_compress_gnu.c (elf_compress_gnu): Call with
ELFCOMPRESS_ZLIB.
* libelfP.h (__libelf_compress): Add new argument.
(__libelf_decompress): Add chtype argument.

src/ChangeLog:

* elfcompress.c (enum ch_type): Add ZSTD.
(parse_opt): Parse "zstd".
(get_section_chtype): New.
(process_file): Support zstd compression.
(main): Add zstd to help.
* readelf.c (elf_ch_type_name): Rewrite with switch.

tests/ChangeLog:

* Makefile.am: Add ELFUTILS_ZSTD if zstd is enabled.
* run-compress-test.sh: Test zstd compression algorithm
for debug sections.
config/libelf.pc.in
configure.ac
libelf/Makefile.am
libelf/elf_compress.c
libelf/elf_compress_gnu.c
libelf/libelfP.h
src/elfcompress.c
src/readelf.c
tests/Makefile.am
tests/run-compress-test.sh