[patch] Add preliminary readelf support for ELFCOMPRESS_ZSTD.

ccoutant@gmail.com ccoutant@gmail.com
Tue Aug 2 23:31:42 GMT 2022


This patch adds support to readelf to recognize the new ELF compression
type. There is more work to be done to actually support compression and
decompression using the zstd library, but I will leave that to the
champions of the new compression option.

-cary


binutils/

	* binutils/readelf.c (process_section_headers): Add support for
	ELFCOMPRESS_ZSTD.

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 157f8d8f6fb..9216ca8efa3 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -7730,6 +7730,8 @@ process_section_headers (Filedata * filedata)
 		    {
 		      if (chdr.ch_type == ELFCOMPRESS_ZLIB)
 			printf ("       ZLIB, ");
+		      else if (chdr.ch_type == ELFCOMPRESS_ZSTD)
+			printf ("       ZSTD, ");
 		      else
 			printf (_("       [<unknown>: 0x%x], "),
 				chdr.ch_type);


More information about the Binutils mailing list