Files
jpwang 283514b070 [llvm-objcopy] Report unsupported formats before compression (#202357)
Fixes #197877.

`llvm-objcopy --compress-sections` now reports unavailable compression
support while parsing the option, matching the behavior of
`--compress-debug-sections`. This avoids reaching compression code with
an unavailable format.

Decompression (either via `--decompress-debug-sections` or
`--compress-sections` with a `none` format) is still checked when the
relevant compressed section is processed, because the required
compression format is determined from the section header rather than
from the command-line option.

The `compress-sections-within-segment` test now requires zlib because
`--compress-sections .text=zlib` is diagnosed during option parsing when
zlib support is unavailable, before the test can reach the intended
"section within a segment" diagnostic.
2026-06-22 09:51:58 +00:00
..