[llvm-readelf] --section-details: display SHF_COMPRESSED headers
authorFangrui Song <i@maskray.me>
Thu, 27 Oct 2022 16:25:21 +0000 (09:25 -0700)
committerFangrui Song <i@maskray.me>
Thu, 27 Oct 2022 16:25:21 +0000 (09:25 -0700)
commite7b360fbbbf0a1e06ff0373928ff44abdbeb2fa8
treec1f1a0702e4f6271017fbf9f80c1918ceac06022
parentc2403f1e3f2a44003a18cb5044cc35b77e9cbe7c
[llvm-readelf] --section-details: display SHF_COMPRESSED headers

readelf --section-details displays ch_type/ch_size/ch_addralign for
a SHF_COMPRESSED section. Port the feature. There is a small difference
that readelf doesn't display `[<corrupt>]` for an empty section while
we do.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D136636
llvm/include/llvm/Object/ELFTypes.h
llvm/test/tools/llvm-readobj/ELF/section-details.test
llvm/tools/llvm-readobj/ELFDumper.cpp