From nobody Mon Jul 25 14:02:14 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ls1vB2cctz4XYmW; Mon, 25 Jul 2022 14:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ls1vB29Skz4PS0; Mon, 25 Jul 2022 14:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658757734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=desZ/2VyXOBVH7ZKoMImDUYD0uw4/kT+Db8jIzZKLNQ=; b=f93PGSFxD6r4RwaJfrABlk7TgrBJkkcCQRTk/Vktfyehu8OsAhjYwXhVnPeR4u+QntphXC hDIvcu8+JlMC5Bi8e32NlOOFr5aPV7Ml5EghcuVpL9GBPJOkhmcmOFxwUWlWyZUwSchBb8 xAiNXh9mbrh8DyLLACJG1FjV0gDrLDMAP/AKxWP5HNTBb0ZXzaCOrtrFGMqXtfhZM7rRuT 5jhlkz/Wfpb2I5hdgpEQbu+tOyN3E0d8a4unxORTE1PXo4GZQl11KRBrwOwE+bkUNkP9Jp St+UB27N7etN/g56GE87KNNA9dpk5G/ilfT+2gi1zRHeHreVMKnac2tGs8r5GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ls1vB1CnMz10nH; Mon, 25 Jul 2022 14:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26PE2EBH031345; Mon, 25 Jul 2022 14:02:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26PE2Ep9031344; Mon, 25 Jul 2022 14:02:14 GMT (envelope-from git) Date: Mon, 25 Jul 2022 14:02:14 GMT Message-Id: <202207251402.26PE2Ep9031344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 05b6744c446c - main - Add ELFCOMPRESS_ZSTD ELF compression constant List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05b6744c446c2d274738fbb27a3ded1bf9f9f1d1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658757734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=desZ/2VyXOBVH7ZKoMImDUYD0uw4/kT+Db8jIzZKLNQ=; b=P6/jUxXa9pK9614U471whiTvN8csvhX21xM7yKe/2K9Mg1kD0HogZFI/seXHPICFvH6kyz m4/QKdG7IXkCaGm+bmezs9L8Ef0z+iH8STlyveNu9AfhStOdKQmv9iu9DIr2cOHY/N+Er8 HPniqroRiFsii9g6N4sxlBrWLHQXRaiO1CD13MPdrjufMh1vn2iuxJ27yPvH7L6Yw8Go3g p3pFikR+yZFnbhtcaO0sbyz5Aisu0GOvP3i4+WlqcIZR7Bjt7JLZjFD+oVb+nDpoNrt5RL LJo7adjKaQlcg09lT2r1m4ufmWzuxWWpg6J62/pUi2/Aycibh4pbLzGIKsP1OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658757734; a=rsa-sha256; cv=none; b=WBM9G2WIsMCniqoZdQ9xidbDhOJbPuaDd6JBkxcLf8v0Fmi2pUonu3sw/XYanNZMed6mxU ljj1L7MirpkObWFq+3/sv4uN7+GuQ+X5L8oAZbiNY76mGl1ThFQtVlGsL29CzqiZXa8Vwy WlY2h7xCL/hVC9beH8N54CgtkN8QOZK4uNupXlKzfRHBsgIYhd7El1Pv2673wNhzAFWUBN A7U3V7GhIWdEmavOdrxdDcRS97MLdUICFQwCHL5PJzPLhEr7jM5p3cbwdqDjhx+FnhtjFv JWNCz8Pgs6rIbPm+LEJtbF+yIRnbOMnM+0heWbeoBjGQAaqD1IzHgl0tVgb2+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=05b6744c446c2d274738fbb27a3ded1bf9f9f1d1 commit 05b6744c446c2d274738fbb27a3ded1bf9f9f1d1 Author: Ed Maste AuthorDate: 2022-06-28 13:06:12 +0000 Commit: Ed Maste CommitDate: 2022-07-25 14:01:54 +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 --- 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 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 */