Project

General

Profile

Actions

Feature #16580

open

libdwarf should support ELFCOMPRESS_ZSTD

Added by Joshua M. Clulow 23 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
lib - userland libraries
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The zstd compression algorithm is seeing increasingly common usage, replacing the use of zlib in a variety of places. One of those places is compressing ELF sections, and other common UNIX platforms have banded together to define ELFCOMPRESS_ZSTD; see: https://groups.google.com/g/generic-abi/c/satyPkuMisk/m/dP2pPh9mAwAJ

The only place we mention ELFCOMPRESS_ZLIB today is in our libdwarf, which needs to be able to decompress debug sections.

It's not clear if we should, for this, depend on a zstd package from the distribution, as we do for zlib, or if we should somehow import a copy into the gate directly. Certainly there will eventually need to be one in the gate for ZFS (e.g., see #9671) and for the boot loader (e.g., see #15787).

This came up because some folks are adding support for zstd compression of DWARF (which is ostensibly a material improvement in binary size) to the Rust toolchain; e.g., https://github.com/rust-lang/backtrace-rs/pull/625

Further reading: https://maskray.me/blog/2022-09-09-zstd-compressed-debug-sections


Related issues

Related to illumos gate - Bug #15787: loader zstd supportIn ProgressToomas Soome

Actions
Related to illumos gate - Feature #9671: ZFS should support ZStandard compressionNewAllan Jude2016-08-31

Actions
Actions #1

Updated by Joshua M. Clulow 23 days ago

  • Related to Bug #15787: loader zstd support added
  • Related to Feature #9671: ZFS should support ZStandard compression added
Actions

Also available in: Atom PDF