[LLVMdev] MCJIT fully position independent code, and the runtime linker

Dave Pitsbawn dpitsbawn at gmail.com
Wed Apr 22 20:30:06 PDT 2015


Hello,

I wanted to know why is there a need for a runtime linker if LLVM can
produce fully relocatable code?

That is, if I ask MCJIT to generate code that uses PC-rel offsets for
everything, why would I need a runtime linker at all?

Is it for name resolution or something I don't get?

To me the JIT seems like an API that can produce assembly that I should be
able to load where-ever I feel like. Only think I can think of is that if I
encounter a call instruction I better have an address to give it to. But
other than that ...

What is preventing this from happening? I'm sure it's my limited
understanding of the linker space, but I would love to understand.

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150422/30a5d351/attachment.html>


More information about the llvm-dev mailing list