<div dir="ltr">Hi Geoff,<br><div><br></div><div>I believe clang also defaults to small for ELF / x86-64 (I'd expect it to be the same as gcc).</div><div><br></div><div>RuntimeDyld currently assumes large code model. Testing and support for the small code model are spotty at best -- it's essentially unsupported. JITLink <i>will</i> support small code model (already does for MachO). The JITLink ELF/x86-64 implementation isn't quite ready for testing yet, but I'll make an announcement as soon as it is.</div><div><br></div><div>-- Lang. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 2, 2020 at 10:02 AM Geoff Levner <<a href="mailto:glevner@gmail.com">glevner@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div>On Fri, Oct 2, 2020 at 6:33 PM Lang Hames <<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Geoff,<br><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I have only encountered one problem. If a static library has not been compiled with -fPIC and uses symbols from a shared library, LLJIT does not complain, but the code may crash without warning when it is executed.</blockquote><div><br></div><div>Was the static library compiled with large code model too?</div></div></div></blockquote><div><br></div><div>I don't think so... All libraries are compiled with gcc 6.3.1, and the gcc documentation says that the default code model is small. I don't know what the default code model is for clang...<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div>I think this is probably a RuntimeDyld bug: It's not great at error reporting. A few people in the community are working on an ELF/x86-64 implementation of JITLink at the moment -- Once we have that you should get small code model support and better error handling.</div><div><br></div><div>-- Lang.</div></div></div>
</blockquote></div></div>
</blockquote></div>