Skip to content

Commit e96889d

Browse files
committed
Revert "Fix compression header size check in ELF writer (#66888)"
This broke lit tests in zstd enabled builds, see comment on the PR. > The test had 32-bit and 64-bit header sizes the wrong way around. This reverts commit c5ecf5a.
1 parent b65da98 commit e96889d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/MC/ELFObjectWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ bool ELFWriter::maybeWriteCompression(
843843
uint32_t ChType, uint64_t Size,
844844
SmallVectorImpl<uint8_t> &CompressedContents, Align Alignment) {
845845
uint64_t HdrSize =
846-
is64Bit() ? sizeof(ELF::Elf64_Chdr) : sizeof(ELF::Elf32_Chdr);
846+
is64Bit() ? sizeof(ELF::Elf32_Chdr) : sizeof(ELF::Elf64_Chdr);
847847
if (Size <= HdrSize + CompressedContents.size())
848848
return false;
849849
// Platform specific header is followed by compressed data.

0 commit comments

Comments
 (0)