git: 3d9d2c27d58a - stable/13 - Add ELFCOMPRESS_ZSTD ELF compression constant
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 Aug 2022 00:35:56 UTC
The branch stable/13 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=3d9d2c27d58a92363713ab3a7822da29b1dcecb9
commit 3d9d2c27d58a92363713ab3a7822da29b1dcecb9
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-06-28 13:06:12 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-08-04 00:35:42 +0000
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
(cherry picked from commit 05b6744c446c2d274738fbb27a3ded1bf9f9f1d1)
---
share/man/man5/elf.5 | 6 +++++-
sys/sys/elf_common.h | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
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 d4508f0750a8..5b7a290fd761 100644
--- a/sys/sys/elf_common.h
+++ b/sys/sys/elf_common.h
@@ -943,6 +943,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 */