Skip to content

Commit

Permalink
[ELF] Fix --compress-debug-sections=zstd when zlib is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed May 7, 2024
1 parent 3f37397 commit 04d0a69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lld/ELF/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defm compress_debug_sections:
MetaVarName<"[none,zlib,zstd]">;

defm compress_sections: EEq<"compress-sections",
"Compress output sections that match the glob and do not have the SHF_ALLOC flag."
"Compress output sections that match the glob and do not have the SHF_ALLOC flag. "
"The compression level is <level> (if specified) or a default speed-focused level">,
MetaVarName<"<section-glob>={none,zlib,zstd}[:level]">;

Expand Down
2 changes: 1 addition & 1 deletion lld/ELF/OutputSections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ template <class ELFT> void OutputSection::maybeCompress() {
compressed.type = ELFCOMPRESS_ZLIB;
compressed.checksum = checksum;
}
#endif

compressed.shards = std::move(shardsOut);
flags |= SHF_COMPRESSED;
#endif
}

static void writeInt(uint8_t *buf, uint64_t data, uint64_t size) {
Expand Down

0 comments on commit 04d0a69

Please sign in to comment.