diff options
author | Hans Wennborg <hans@chromium.org> | 2023-11-06 14:27:06 +0100 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2023-11-06 14:32:24 +0100 |
commit | e96889d36f4528127e649bb90125094c75aa1628 (patch) | |
tree | 60ededb1b2f7b22eab73711b5e929e7729a6c633 /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | b65da9848b46a94c37886772609c6ef9901a9f3a (diff) | |
download | llvm-e96889d36f4528127e649bb90125094c75aa1628.zip llvm-e96889d36f4528127e649bb90125094c75aa1628.tar.gz llvm-e96889d36f4528127e649bb90125094c75aa1628.tar.bz2 |
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 c5ecf5a130f087f493802800f3565c7bb75c238a.
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index e4d18d8..8490fef 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -843,7 +843,7 @@ bool ELFWriter::maybeWriteCompression( uint32_t ChType, uint64_t Size, SmallVectorImpl<uint8_t> &CompressedContents, Align Alignment) { uint64_t HdrSize = - is64Bit() ? sizeof(ELF::Elf64_Chdr) : sizeof(ELF::Elf32_Chdr); + is64Bit() ? sizeof(ELF::Elf32_Chdr) : sizeof(ELF::Elf64_Chdr); if (Size <= HdrSize + CompressedContents.size()) return false; // Platform specific header is followed by compressed data. |