diff options
author | Fangrui Song <maskray@google.com> | 2022-11-10 22:09:09 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-11-10 22:09:09 -0800 |
commit | 8b2d02cbb924f1f3718dc5a20f7a9dcf07739d23 (patch) | |
tree | a36e40d97c9024e70eb396345c524d3777e1b6b0 /gold/options.cc | |
parent | 332a4eeaea69034b8ee6f50b931ce6734b55bf08 (diff) | |
download | binutils-gdb-8b2d02cbb924f1f3718dc5a20f7a9dcf07739d23.tar.gz |
gold: add --compress-debug-sections=zstd [PR 29641]
This option compresses output debug sections with zstd and sets ch_type
to ELFCOMPRESS_ZSTD. Latest gdb and lldb support ELFCOMPRESS_ZSTD.
There will be an error if zstd is not enabled at configure time.
error: --compress-debug-sections=zstd: gold is not built with zstd support
Diffstat (limited to 'gold/options.cc')
-rw-r--r-- | gold/options.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gold/options.cc b/gold/options.cc index 04be98a3e39..fbd727199f1 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -1433,6 +1433,15 @@ General_options::finalize() } } +#ifndef HAVE_ZSTD + if (strcmp(this->compress_debug_sections(), "zstd") == 0) + { + gold_error(_("--compress-debug-sections=zstd: gold is not built with " + "zstd support")); + this->set_compress_debug_sections("none"); + } +#endif + // --rosegment-gap implies --rosegment. if (this->user_set_rosegment_gap()) this->set_rosegment(true); |