[llvm-objcopy] Remove support for legacy .zdebug sections
authorFangrui Song <i@maskray.me>
Wed, 29 Jun 2022 17:42:54 +0000 (10:42 -0700)
committerFangrui Song <i@maskray.me>
Wed, 29 Jun 2022 17:42:55 +0000 (10:42 -0700)
commit45ae553109af8e1e71ae5ddf3d92fc1bf531aea1
treecfbc1fb5a6ab43b3f547905815985d93bf3a0b05
parentdd48d3ad0e5fff78e6e3a7fd8ca830624ccb8e33
[llvm-objcopy] Remove support for legacy .zdebug sections

clang 14 removed -gz=zlib-gnu support and ld.lld removed linker input support
for zlib-gnu in D126793. Now let's remove zlib-gnu from llvm-objcopy.

* .zdebug* sections are no longer recognized as debug sections. --strip* don't remove them.
  They are copied like other opaque sections
* --decompress-debug-sections does not uncompress .zdebug* sections
* --compress-debug-sections=zlib-gnu is not supported

It is very rare but in case a user has object files using .zdebug . They can use
llvm-objcopy<15 or GNU objcopy for uncompression.
--compress-debug-sections=zlib-gnu is unlikely ever used by anyone, so I do not
add a custom diagnostic.

Differential Revision: https://reviews.llvm.org/D128688
14 files changed:
llvm/docs/ReleaseNotes.rst
llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
llvm/lib/ObjCopy/ELF/ELFObject.cpp
llvm/lib/ObjCopy/ELF/ELFObject.h
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-default-gnu.test [deleted file]
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-groups.test
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-invalid-format.test
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-symbols.test
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test [deleted file]
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections.test
llvm/test/tools/llvm-objcopy/ELF/strip-debug.test
llvm/test/tools/llvm-objcopy/ELF/zdebug.yaml [new file with mode: 0644]
llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
llvm/tools/llvm-objcopy/ObjcopyOpts.td