[ELF] Use compression::getReasonIfUnsupported for zlib/zstd unavailable error
authorFangrui Song <i@maskray.me>
Thu, 6 Jul 2023 17:31:45 +0000 (10:31 -0700)
committerFangrui Song <i@maskray.me>
Thu, 6 Jul 2023 17:31:45 +0000 (10:31 -0700)
commitb7d36a1a1e0ebf995381e36464abf52e95b76779
tree90a6231b73236717a57ce912d04f9b444725c9db
parent4b36b2c23cc628aad2b7749526f77abd7f85aaae
[ELF] Use compression::getReasonIfUnsupported for zlib/zstd unavailable error

The error message now matches llvm-objcopy --compress-debug-sections=[zlib|zstd].
lld/ELF/Driver.cpp
lld/test/ELF/compress-sections-err.s [new file with mode: 0644]