Index: tools/llvm-objcopy/ELF/Object.cpp =================================================================== --- tools/llvm-objcopy/ELF/Object.cpp +++ tools/llvm-objcopy/ELF/Object.cpp @@ -1111,7 +1111,8 @@ default: { Data = unwrapOrError(ElfFile.getSectionContents(&Shdr)); - if (isDataGnuCompressed(Data) || (Shdr.sh_flags & ELF::SHF_COMPRESSED)) { + StringRef Name = unwrapOrError(ElfFile.getSectionName(&Shdr)); + if (Name.startswith(".zdebug") || (Shdr.sh_flags & ELF::SHF_COMPRESSED)) { uint64_t DecompressedSize, DecompressedAlign; std::tie(DecompressedSize, DecompressedAlign) = getDecompressedSizeAndAlignment(Data);