<div dir="ltr"><div style>+glider</div><div style><br></div><div style>Decreasing the binary size is a great goal... I think that dlopen'ing DSOs that weren't linked with is a pretty common scenario, but it's just a guess. Alex, does this happen in Chromium, for example?</div>
<div style>If the workaround for users will be to manually add --export-dynamic to the link command, we should mention it somewhere in the manual.</div><div><br></div><div>On Sat, Mar 16, 2013 at 5:35 AM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>When linking a sanitizer runtime, we add -export-dynamic to the link lines. This can *dramatically* increase binary sizes (I've seen a 25% increase in some cases), and seems to be largely unnecessary -- the sanitizer symbols should be exported anyway if the linker is told about any DSOs which need the runtime and will be linked against the binary.</div>

<div><br></div><div>However, this will presumably break any mostly-static binaries which don't link against any sanitizer-using DSOs, but do dlopen such DSOs. If we care about that, I think the right way to handle it would be to add a file containing a list of exported sanitizer symbols to compiler-rt, and pass that file to the linker with --dynamic-list when linking in a sanitizer.</div>
</blockquote><div style><br></div><div style>Do you plan to generate this list when building compiler-rt and store it next to the runtime in the resource directory?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><br></div><div>What do you think? Is this patch OK as-is, or do you want the more complete solution?</div><div><br></div><div>Thanks!<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>
Richard</div>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div></div>