<div dir="ltr"><div dir="ltr">On Mon, Feb 13, 2023 at 4:01 AM Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">* Alan Bateman:<br>
<br>
> On 13/02/2023 09:58, Florian Weimer wrote:<br>
>> :<br>
>>> Yeah, the loadLibrary and friends need to be able look up built-in<br>
>>> libraries in the executable (within the image ELF section). The<br>
>>> existing JDK code is already able to handle built-in libraries<br>
>>> (partially). Please see more details for built-in native support in<br>
>>> earlier comments.<br>
>> I believe that will require a custom glibc patch that has not been<br>
>> upstreamed.<br>
<br>
> JEP 178 [1] added support for statically linking native libs. It might<br>
> be that this proposal builds on that.<br>
<br>
I was under the impression that it's about loading a separate DSO<br>
embedded in the main executable file, without copying out to the file<br>
system first.  As far as I understand it, there is a mechanism that<br>
deals with this for the JAR case, but it requires the extra copy.<br></blockquote><div><br></div><div>Florian,</div><div><br></div><div>The current proposal is built on top of the existing OpenJDK static support. We did prototyping for the file embedded DSO approach (it worked experimentally for Java in my test) and had multiple rounds of internal discussions with the folks involved in C++ tool chain, profiling tools (and kernel). We've determined that was not a desirable solution. Please see the previous email for more details on the issues with file embedded DSOs approach.</div><div><br></div><div>We also considered startup-time/install-time extraction. Based on the feedback from other language usages in real production, extraction has real production challenges in many cases, including (tmpfs) file system configuration/management issues, possible security vulnerabilities, temp space pollution, extraction conflicts, and etc. (thanks to the feedback from other language experts from their experiences!). Those make the extraction approach unattractive.</div><div> </div><div>Best,</div><div>Jiangli</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks,<br>
Florian<br>
<br>
</blockquote></div></div>