[llvm-dev] Relocation Assertion error

Christoph Höger via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 26 08:42:02 PST 2017

Dear all,

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.

(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.

(2) But I fail even to load a single instance of a test program. lli
crashes in this assertion:


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?

Also I would appreciate any hints regarding (1), has something like this
been done somewhere already? is it even possible?

thank you very much,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170126/85c6197e/attachment.html>

More information about the llvm-dev mailing list