<div dir="ltr">The code in LLD, you mean? Ah - I'll leave that side to you, for sure. Not sure what George has in mind for how this would fit/be used in LLD.<br><br>(For llvm-dwp the sections have no relocations, so it's totally applicable there, but I don't expect to use that as the motivation for committing this patch - but as a possible thing I could reuse the functionality for at some point)</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 11, 2017 at 10:07 AM Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">You can indeed do that way, but the code to do that would look very different from the current code, because you need to apply relocations and pass it to zlib for each input section. Not sure if it's worth it.</div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Tue, Apr 11, 2017 at 9:59 AM, David Blaikie <span dir="ltr" class="gmail_msg"><<a href="mailto:dblaikie@gmail.com" class="gmail_msg" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><span class="gmail_msg"><div dir="ltr" class="gmail_msg">On Tue, Apr 11, 2017 at 9:47 AM Rui Ueyama via Phabricator <<a href="mailto:reviews@reviews.llvm.org" class="gmail_msg" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added a comment.<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
I wonder why you want a streaming compression support to write compressed .debug sections. All you need is to call zlib's `compress2` only once for each section, no?<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg"></blockquote></span><div class="gmail_msg"><br class="gmail_msg">Potentially to avoid having to manifest the entire output section in a single buffer in memory first (eg: if you're compressing 3 chunks from input objects together into the final output section - you can avoid the intermediate buffer/copying/etc, by passing the chunk from each input object in to a streaming compression device). At least that's what I'd use this for in llvm-dwp.<br class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
<a href="https://reviews.llvm.org/D31943" rel="noreferrer" class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg" target="_blank">https://reviews.llvm.org/D31943</a><br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
<br class="m_-8932831199896939002m_-8069685880638433080gmail_msg gmail_msg">
</blockquote></div></div>
</blockquote></div><br class="gmail_msg"></div>
</blockquote></div>