[PATCH] D58704: Initial (incomplete) implementation of JITLink - A replacement for RuntimeDyld.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 15:20:55 PST 2019


ruiu added a comment.

In D58704#1415399 <https://reviews.llvm.org/D58704#1415399>, @kparzysz wrote:

> Since you're rewrite this, is there any potential for sharing code with lld?  Relocating instructions should essentially be the same between these two.


I haven't read this patch, but as a general comment, I could say that a static linker is fairly different from a JIT linker. A JIT linker is probably more close to a dynamic linker (or a loader) than a static linker. They are situated at different stages of making a program. In the pipeline of (1) compile, (2) link, (3) load and run, the static linker is the second stage and the dynamic loader and perhaps a JIT linker are the third. So, even though we call the second and the third stage "linker", they are not too similar. Even the relocation handling is pretty different -- a static linker reads relocations and possibly creates dynamic relocations if relocations cannot be resolved at link-time. A static linker may also create GOT/PLT entries and other data structures. All of them are not needed if you are creating an in-memory image of an executable. So a JIT linker and a static linker are naturally fairly different, and I don't think it is very easy to find large commonality between them.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58704/new/

https://reviews.llvm.org/D58704





More information about the llvm-commits mailing list