From nobody Thu Aug 4 00:35:56 2022 X-Original-To: dev-commits-src-all@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 4LyqXD3bN1z4YGdH; Thu, 4 Aug 2022 00:35:56 +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 4LyqXD348Mz3nNw; Thu, 4 Aug 2022 00:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659573356; 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=vMx7NPJaY0Y8C39bOXnIy6MSaqIymJ3RFmlc5PUWVaY=; b=QJfSW4GQSD/4ve4oVkLKoB/H5xhsnRjnb/oIQtHoS5/+JrmleDm8AS29hkzeTBxRRq/3ud 774ostMWU76qRU5v9BzJZyGW2tXIVUZwuFDsgQfi+wD6MMcEGgrPLJnWVXG/+r9vaKB/32 bcKFirhBC50+G6bVmNW2afdxgAwQod845AL2NwU5et5XA8UKYXEhCKp6AyCFxzhIPISqT2 sSVQqgBSlwfSqaM+HNAKOXlW6wNboxiQ26kcxDRG2rrPOkiI3BZ3x4gBY2hamzv2na1Hd8 8iEiQfu2lhrXHoP5r53pfU2mo36tXGPrPXV16M6WMH+P8Z140qYSZtMKu+c1/Q== 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 4LyqXD27KLz19p9; Thu, 4 Aug 2022 00:35:56 +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 2740ZuOm070083; Thu, 4 Aug 2022 00:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2740ZuRW070082; Thu, 4 Aug 2022 00:35:56 GMT (envelope-from git) Date: Thu, 4 Aug 2022 00:35:56 GMT Message-Id: <202208040035.2740ZuRW070082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3d9d2c27d58a - stable/13 - Add ELFCOMPRESS_ZSTD ELF compression constant List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3d9d2c27d58a92363713ab3a7822da29b1dcecb9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659573356; 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=vMx7NPJaY0Y8C39bOXnIy6MSaqIymJ3RFmlc5PUWVaY=; b=kr5nFnILagn54aBzehSZBdQ6vdG7SrH5X8h9frivKKERdiJNiwy+1NmxRvC+eYTIZc0ldV v9ySWvhl1viJakCikA/HlCnc7IyqH/d90fTxwpZFV9jtP8KFSZcVPiwOWnPyFH85pXplyQ PztJMg7S93AY0df3llPxSvWyp2ceVi+lynnLp1Vv6GECiJCAxUOST31B5PEX8AuVdXxUqI xaykpSk2zsOnuQDPurejA//GLsEqOqMGDEM7AtIKoB6aUupY/2hoXsCZJoh4ZTRiMKscNb Ecm/1vDQmimbegf0+nJVRKYmh1Zgkq/JX06blOLJlZhXRUdf0TuglF54GOVZIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659573356; a=rsa-sha256; cv=none; b=fdrXBgABUR5xUxV8Oohe2mK8YX0BA+sO9WT8NqVd4BT7KwhWHgcOlnC136gTURw9MWLeVr yZFdchghOQ6pfYVPNk/mT9GEupSgSbdGyikfkRgRvsb9Hg5BdH/zY2Q5RQ/p72SB5uWHSe 4iRvxJRo8L86WGlq7SC8ZCTeO9bh3Ily6gy3Te9ZHyRBxaspHcTYKngT44cvcqwBRJAezK tJNKOwTu9mjUbwgAulFa8OB7pVPnGrcgc0+k+TBdibiFppBSK11OTQOhmC9FhHZn8nL1gl uG/AfIbov3ujjg0oZ3Vo1qhI68Mi6AP1P0vLo7PCMdPd2KRhn/zEYFp0n+e7tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3d9d2c27d58a92363713ab3a7822da29b1dcecb9 commit 3d9d2c27d58a92363713ab3a7822da29b1dcecb9 Author: Ed Maste AuthorDate: 2022-06-28 13:06:12 +0000 Commit: Ed Maste 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 */