[LLVMdev] Generating machine code directly to memory

Owen Anderson resistor at mac.com
Wed Jul 9 14:00:47 PDT 2008


On Jul 9, 2008, at 1:48 PM, Sampsa Lehtonen wrote:

> Hello,
>
> Is it possible to produce machine code directly to memory buffer so  
> that
> it could be called immediately?
>

Sampsa,

The problem is that statically compiled programs (other than code that  
runs directly on the hardware, like firmware code) are not just a blob  
on binary instructions.  They are wrapped in complicated linker  
formats (ELF, Mach-O, PE, etc.) containing metadata, dynamic linker  
instructions, and lots of other stuff.  Hence the problem is a lot  
more complicated than just dumping out, say, the hex output of the JIT.

--Owen



More information about the llvm-dev mailing list