<div dir="ltr">We can compress debug sections in compiler-generated object files as well as linker-generated executables. So the question whether we should compress debug sections is not only relevant to lld but to clang, and I think it's actually a whole toolchain-level decision.<div><br></div><div>If we decide to compress debug sections for some target, we should make a change to the compiler driver to flip the default for a compiler flag to turn on compression. lld is invoked by the compiler driver, so a change for the linker would be added to the compiler driver too.</div><div><br></div><div>I think I'm mildly in favor of making such change -- I guess the cost of compress doesn't too high, and that might even make things <i>faster</i> by reducing the amount of IO. I'd guess people wouldn't even care whether debug sections are compressed or not, as their tools already support it. But I don't have an evidence that the latter is actually the case.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><strong>From: </strong>Romain GEISSLER via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>></span><br><strong>Date: </strong>Mon, May 6, 2019 at 2:18 AM<br><strong>To: </strong><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
In the file lld/ELF/Driver.cpp in function getCompressDebugSections we can see that the current default for lld is no debug section compression. It looks like tools like gdb, valgrind, elfutils, gcc's backtrace lib currently support compressed symbols. Since perf can use libdw from elfutils, I guess it supports it too.<br>
<br>
Do you think it's time to enable compressed debug section by default ? On some of my big binaries (several hundreds of MB) this could save 50% of the overall binary size.<br>
<br>
Cheers,<br>
Romain<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>