[PATCH] D128667: [WIP] Add Zstd ELF support

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 27 16:36:53 PDT 2022


dblaikie added a comment.

Yeah, probably worth splitting this up a bit - somewhat hard to split up generation+parsing in LLVM itself (eg: llvm-mc+llvm-objdump), so maybe they're grouped together (alternatively the objdump support gets checked in first with precompiled/binary test files - I forget what I did when I added the compression support initially) - but lld at least can be separated out.



================
Comment at: lld/ELF/InputSection.cpp:78-80
+    if (!compression::zlib::isAvailable() || !compression::zstd::isAvailable())
       error(toString(file) + ": contains a compressed section, " +
+            "but zlib or zstd is not available");
----------------
Perhaps we can delay this failure/error until the type of compressed section is parsed, then error if the specific kind of compression isn't available - rather than giving the user a more vague error here that doesn't tell them which kind of compression they need to be built into the linker.

(but yeah, if @MaskRay is going to take the lld support into a separate patch the feedback/discussion can happen there)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128667/new/

https://reviews.llvm.org/D128667



More information about the cfe-commits mailing list