<div dir="ltr"><div><div><div><div><div><div><div>Dear all,<br><br></div>I am trying to load statically linked ELF object files into an ExecutionEngine in order to dynamically load compiled programs/libraries into llvm generated code etc. at runtime. In order to test the general feasibility, I am currently toying around with lli. <br></div><br>(1) My general idea is to use the ExecutionEngine as a wrapper to isolate multiple instances of the same library and its symbols. To do so, I hope to load the code into the heap, link it and run it afterwards.<br><br></div>(2) But I fail even to load a single instance of a test program. lli crashes in this assertion:<br><br><a href="https://github.com/llvm-mirror/llvm/blob/release_38/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp#L244">https://github.com/llvm-mirror/llvm/blob/release_38/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp#L244</a><br><br></div>As far as I can tell, this test invokes a limit on the range of addresses for relocated symbols. I am running a 64bit machine and Value is quite large just after allocation (0x7ffff...), so I wonder if I did something wrong when creating the object file or if there is a bug in the loader.  Could someone please shed some light on this assertion? <br><br></div>Also I would appreciate any hints regarding (1), has something like this been done somewhere already? is it even possible?<br><br></div>thank you very much,<br><br></div>Christoph<br><div><div><div><br><br><div><div><div><br></div></div></div></div></div></div></div>