diff options
author | Ed Maste <emaste@FreeBSD.org> | 2022-06-28 13:06:12 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2022-07-25 14:01:54 +0000 |
commit | 05b6744c446c2d274738fbb27a3ded1bf9f9f1d1 (patch) | |
tree | 9064b19bebebfd7571bc333ee80142769e7c837d | |
parent | 865a58d2fc89616a0ab2f88016da43e980dcac1d (diff) | |
download | src-05b6744c446c2d274738fbb27a3ded1bf9f9f1d1.tar.gz src-05b6744c446c2d274738fbb27a3ded1bf9f9f1d1.zip |
Add ELFCOMPRESS_ZSTD ELF compression constant
ELFCOMPRESS_ZSTD indicates that an ELF section is compressed with zstd.
It is the second compression type, after the existing ELFCOMPRESS_ZLIB.
Zstd generally provides a compelling tradeoff of speed and compression
(other algorithms may compress slightly better but take a lot longer,
or run faster but do not compress nearly as well).
See https://groups.google.com/g/generic-abi/c/satyPkuMisk for details.
ELFCOMPRESS_ZSTD will be supported in a future Clang/LLVM update. ELF
Tool Chain tools also need updating.
Reviewed by: Fangrui Song
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | share/man/man5/elf.5 | 6 | ||||
-rw-r--r-- | sys/sys/elf_common.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/share/man/man5/elf.5 b/share/man/man5/elf.5 index 81376e7e6bb9..95bc183a1f91 100644 --- a/share/man/man5/elf.5 +++ b/share/man/man5/elf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 27, 2021 +.Dd July 25, 2022 .Dt ELF 5 .Os .Sh NAME @@ -1103,6 +1103,10 @@ A value of .Dv ELFCOMPRESS_ZLIB indicates that the data is compressed using .Xr zlib 3 . +A value of +.Dv ELFCOMPRESS_ZSTD +indicates that the data is compressed using +Zstandard. .It Dv ch_size The size, in bytes, of the uncompressed section data. This corresponds to the diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 4eae060895ab..23440f535887 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -944,6 +944,7 @@ typedef struct { /* Values for ch_type (compressed section headers). */ #define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE */ +#define ELFCOMPRESS_ZSTD 2 /* Zstandard */ #define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific */ #define ELFCOMPRESS_HIOS 0x6fffffff #define ELFCOMPRESS_LOPROC 0x70000000 /* Processor-specific */ |