<p dir="ltr">For reference, the gdbserver binary currently in the toolchain is statically linked.</p>
<p dir="ltr">Using a shim results in about a 5M increase in the lldb-server binary because of the need to export all symbols dynamically. And still has those two bugs (which would be in the system libs, if linked dynamically).</p>
<div class="gmail_quote">On Jul 2, 2015 08:32, "Pavel Labath" <<a href="mailto:labath@google.com">labath@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added a comment.<br>
<br>
In <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10887-23198515&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=0s5jGW8izLThPnoeJwNRwDjxad-w7givTNSK2rq5cFs&s=1xDlfxDhY_5XuX8LY3RIPmeBtPZb7cuD4WpIcouF_Fs&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10887#198515</a>, @chaoren wrote:<br>
<br>
> - <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__b.android.com_178448&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=0s5jGW8izLThPnoeJwNRwDjxad-w7givTNSK2rq5cFs&s=Smj9NTOia6v__fIpE2xpFW_1v2Ijxu0rFa5AoLbyi64&e=" rel="noreferrer" target="_blank">b.android.com/178448</a><br>
> - pthread_sigmask doesn't work at all in the older toolchains<br>
><br>
>   The only possible problems I can see right now are missing syscalls, and we can easily get a diff of those between API 21 and API 9.<br>
<br>
<br>
The sentence "in general, statically linked binaries are compatible with neither older nor newer releases, especially where networking is concerned" from the bug leads me to believe that we should reconsider the static linking approach. I would normally expect these to be at least forward compatible, but if they don't guarantee even that, I think we should go back to the idea of using a non-pie shim process to load the lldb-server on old devices. Otherwise, we can encounter subtle and annoying breakages, which I would prefer to avoid.<br>
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10887&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=0s5jGW8izLThPnoeJwNRwDjxad-w7givTNSK2rq5cFs&s=N9NtK01Vns3z6qQ-ZhxjgTCoRVQz8Qn24ZHjw8UpcWE&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10887</a><br>
<br>
<br>
<br>
</blockquote></div>