[LLVMdev] JIT question about resolving unknown function calls

Carter Cheng carter_cheng at yahoo.com
Mon Jun 29 23:04:17 PDT 2009


Thanks.

--- On Mon, 6/29/09, Chris Lattner <clattner at apple.com> wrote:

> From: Chris Lattner <clattner at apple.com>
> Subject: Re: [LLVMdev] JIT question about resolving unknown function calls
> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Date: Monday, June 29, 2009, 10:18 AM
> 
> On Jun 29, 2009, at 3:37 AM, Carter Cheng wrote:
> 
> >
> > My understanding is that the JIT system allows during
> the running of  
> > the system resolution of call instructions to
> undefined functions to  
> > be trapped and then patched with the correct address
> (is this true?).
> 
> Yes, see:
> http://llvm.org/docs/tutorial/LangImpl4.html#jit
> 
> > The question I have is does the current system also
> allow for  
> > repatching? for a certain OO system I am working on
> this could be  
> > desirable when an object/class is updated and
> replaced- making it  
> > possible in certain cases to update the call point as
> the code is  
> > replaced.
> 
> You can repatch a function that was hitted with the  
> ExecutionEngine::recompileAndRelinkFunction method. 
> If you have a  
> symbol that isn't JIT'd that you want to move around, just
> define a  
> global that holds the pointer, and change the pointer as
> you wish.
> 
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu 
>        http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 


      




More information about the llvm-dev mailing list