[PATCH] D128688: [llvm-objcopy] Remove support for legacy .zdebug sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 16:29:30 PDT 2022


MaskRay created this revision.
MaskRay added reviewers: alexander-shaposhnikov, ckissane, jhenderson.
Herald added subscribers: StephenFan, abrachet, hiraditya, emaste.
Herald added a reviewer: rupprecht.
Herald added a reviewer: ctetreau.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

clang 14 removed -gz=zlib-gnu support and ld.lld removed linker input support
for zlib-gnu in D126793 <https://reviews.llvm.org/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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128688

Files:
  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
  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
  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
  llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
  llvm/tools/llvm-objcopy/ObjcopyOpts.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128688.440430.patch
Type: text/x-patch
Size: 14671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220627/10a8588b/attachment.bin>


More information about the llvm-commits mailing list