if (Error E = Dec.decompress({OutputBuf, Size}))
fatal(toString(this) +
": decompress failed: " + llvm::toString(std::move(E)));
- Data = ArrayRef<uint8_t>((uint8_t *)OutputBuf, Size);
+ this->Data = ArrayRef<uint8_t>((uint8_t *)OutputBuf, Size);
+ this->Flags &= ~(uint64_t)SHF_COMPRESSED;
}
uint64_t SectionBase::getOffset(const DefinedRegular &Sym) const {
std::stable_sort(Sections.begin(), Sections.end(), compCtors);
}
-static uint64_t getOutFlags(InputSectionBase *S) {
- return S->Flags & ~SHF_GROUP & ~SHF_COMPRESSED;
-}
-
static SectionKey createKey(InputSectionBase *C, StringRef OutsecName) {
// The ELF spec just says
// ----------------------------------------------------------------
return;
}
- uint64_t Flags = getOutFlags(IS);
+ uint64_t Flags = IS->Flags & ~(uint64_t)SHF_GROUP;
if (Sec) {
if (getIncompatibleFlags(Sec->Flags) != getIncompatibleFlags(IS->Flags))
error("incompatible section flags for " + Sec->Name +
continue;
StringRef OutsecName = getOutputSectionName(MS->Name);
- uint64_t Flags = MS->Flags & ~(uint64_t)(SHF_GROUP | SHF_COMPRESSED);
+ uint64_t Flags = MS->Flags & ~(uint64_t)SHF_GROUP;
uint32_t Alignment = std::max<uint32_t>(MS->Alignment, MS->Entsize);
auto I = llvm::find_if(MergeSections, [=](MergeSyntheticSection *Sec) {