public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch] Add preliminary readelf support for ELFCOMPRESS_ZSTD.
@ 2022-08-02 23:31 ccoutant
  2022-08-03  6:48 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: ccoutant @ 2022-08-02 23:31 UTC (permalink / raw)
  To: binutils

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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-05  0:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 23:31 [patch] Add preliminary readelf support for ELFCOMPRESS_ZSTD ccoutant
2022-08-03  6:48 ` Jan Beulich
2022-08-05  0:13   ` Cary Coutant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).