<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 15, 2017 at 3:39 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-"><div>On Fri, Sep 15, 2017 at 3:26 PM, Davide Italiano via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br></div></span><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_4003029612712173990HOEnZb"><div class="gmail-m_4003029612712173990h5">On Fri, Sep 15, 2017 at 2:58 PM, Rafael Avila de Espindola via<br>
llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> BTW, I have tried to change this to always create a dynamic symbol table<br>
> first and remove it in removeUnusedSyntheticSections if empty.<br>
><br>
> A change is that we would have a dynamic symbol table on otherwise<br>
> static programs if they had an undefined weak symbol. As far as I can<br>
> tell, that is harmless.<br>
><br>
> An annoying case is what to do with _DYNAMIC. The current patch has two<br>
> passes over the symbols. First checking if we need anything in the<br>
> dynamic symbol table. After that pass removeUnusedSyntheticSections can<br>
> remove the dynamic sections (.dynsym, .dynamic, etc) and we can decide<br>
> if _DYNAMIC should be added to the staic symbol table.<br>
><br>
> A wip patch is attached. Does anyone think this is a good idea?<br>
><br>
> And yet another option is to always have a .dynsym table. The extra cost<br>
> on static binaries would be really small, so this is tempting.<br>
><br>
<br>
</div></div>This last option is my favourite one. The impact in size should be<br>
really negligible.<br>
If there are objections, we should try to go for your WIP patch, but<br>
I'm under the impression the benefits introduced are not worth the<br>
complexity added.<br></blockquote><div><br></div></span><div>I'd like to see an actual patch, but I agree that we don't too much about size if size difference is negligible.</div><span class="gmail-"><div><br></div></span></div></div></div></blockquote><div><br></div><div>sorry for the typo: we don't *worry* too much </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks for digging into this,<br>
<br>
--<br>
Davide<br>
<div class="gmail-m_4003029612712173990HOEnZb"><div class="gmail-m_4003029612712173990h5">______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>