aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-07-14 10:12:48 -0700
committerFangrui Song <i@maskray.me>2022-07-14 10:12:48 -0700
commitecfaf4801cd0cc85fdced820110652f0281765fa (patch)
treeb4e683bccc5efb09f1813c659536f09bb4ffd9ed /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parent2f11b3a6d7b8083be570f79f4ca18dfb2648eda3 (diff)
downloadllvm-ecfaf4801cd0cc85fdced820110652f0281765fa.zip
llvm-ecfaf4801cd0cc85fdced820110652f0281765fa.tar.gz
llvm-ecfaf4801cd0cc85fdced820110652f0281765fa.tar.bz2
[lldb] Remove ELF .zdebug support
clang 14 removed -gz=zlib-gnu support and ld.lld/llvm-objcopy removed zlib-gnu support recently. Remove lldb support by migrating away from llvm::object::Decompressor::isCompressedELFSection. The API has another user llvm-dwp, so it is not removed in this patch. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D129724
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index f9fb368..122298d 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1607,7 +1607,7 @@ lldb::user_id_t ObjectFileELF::GetSectionIndexByName(const char *name) {
}
static SectionType GetSectionTypeFromName(llvm::StringRef Name) {
- if (Name.consume_front(".debug_") || Name.consume_front(".zdebug_")) {
+ if (Name.consume_front(".debug_")) {
return llvm::StringSwitch<SectionType>(Name)
.Case("abbrev", eSectionTypeDWARFDebugAbbrev)
.Case("abbrev.dwo", eSectionTypeDWARFDebugAbbrevDwo)
@@ -3365,8 +3365,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
return section->GetObjectFile()->ReadSectionData(section, section_data);
size_t result = ObjectFile::ReadSectionData(section, section_data);
- if (result == 0 || !llvm::object::Decompressor::isCompressedELFSection(
- section->Get(), section->GetName().GetStringRef()))
+ if (result == 0 || !(section->Get() & llvm::ELF::SHF_COMPRESSED))
return result;
auto Decompressor = llvm::object::Decompressor::create(