<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks John.</div><div><br></div><div>I had passed over ExecutionEngine as it looked like it offered a JIT. Maybe there's more to it than meets the (hasty) eye though.</div><div><br></div><div>I'm interested in getting a native image. Ultimately, I'd like to do things like emitting Objective-C IMPs and building Objective-C classes around them. </div><div>However, I'm going one step at a time (there's probably much to learn and maybe gotchas to discover before I get to this). </div><div>To begin with, I figured I'd try to get a Mach-O file written out, dload'ed and then make a regular C call to a loaded function. </div><div><br></div><div>So, I'll take a look at ExecutionEngine, but I'm still curious if I'm currently able to emit Mach-O dylibs directly from the LLVM tool chain, or if I have to go a little more round-the-houses (perhaps emitting .s and then using platform tools to get to the dylib).</div><div><br></div><div>-- lwe</div><div><br></div><br><div><div>On 15-Mar-09, at 6:09 PM, John McCall wrote:</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; "></div><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; ">Are you just loading functions into the current process? There's no </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; ">need</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; ">to create temporary object files and dynamically link them in; LLVM is</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; ">perfectly capable of assembling a function in memory. Look up the</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; ">docs for llvm::ExecutionEngine::create and go from there.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; ">John.</div></blockquote></body></html>