[LLVMdev] Lightweight code loader
Chris Lattner
sabre at nondot.org
Mon May 16 11:24:41 PDT 2005
On Mon, 16 May 2005, Alexander Friedman wrote:
> Would it be possible (ie, relatively straitforward) to do the
> following: Take the code in module A, compile it with the JIT (since
> we cannot make libraries in Windows), and save the resulting binary
> goo in some file. Later (in a different instance of the runtime), with
> some much smaller sized loader, read in the file and link that code to
> the runtime. The platforms we care about this working on is the x86,
> ppc, and sparc v9.
Yes, this would be straight-forward. The output of the code generator is
a bunch of bytes of machine code and relocations to perform on it. This
is exactly what you would need to do this.
> While it would be nice to be able to build a runtime that only
> contains the absolute minimal, this seems rather non-trivial, but
> maybe I am wrong. If this is indeed involved, fraught with danger (ie,
> would make it impossible to debug) etc, let me know as well.If there
> is some other clever (or obvious) way to accomplish the same thing,
> I'd love to hear any ideas.
Another option might be to just fix building .dll's on windows :)
-Chris
--
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/
More information about the llvm-dev
mailing list