Re: [Myjit-devel] how to store generated code
Status: Beta
Brought to you by:
pkrajca
From: Petr K. <pk...@io...> - 2016-02-05 10:49:39
|
Hi, it should be sufficient to copy out the code from the buffer in "struct jit", i.e., unsigned char *mem = ... int code_size = jit->ip - jit->buf; memcpy(mem, jit->buf, code_size); However, I'm not sure if the emitted code is fully PIC. Recently, I've made changes in this direction but any interaction with the world outside of MyJIT may be an issue. Best regards, Petr On Fri, 05 Feb 2016 02:07:40 +0100, mahdi <xem...@ya...> wrote: > Hi, > > How can I store the output generated code in a buffer to be saved to an > output file? > > > > Best Regards |