[LLVMdev] simple questions -and wiki

Basile STARYNKEVITCH basile at starynkevitch.net
Tue Apr 24 12:46:00 PDT 2007


Hello All,

Some people thought about a n LLVM wiki. Is there some alreadly? I wish it
would be linked from LLVM.org site.

Here are a few questions which I would like to be answered (preferably on a Wiki, to possibly participate):

assuming that LLVM (latest from CVS) was configure-d with
  ./configure '--ENABLE-TARGETS=HOST-ONLY' '--WITH-GNU-LD'

My main (currently platonic - ie no real work yet) interest is in dynamic
code generation within my application. but i might want possibly to persist
the generated code (and somehow relead it at next application run).

how to emit an llvm moduls as (all of)
  an elf shared object
  a generated c file
  a JIT-ted in-memory module

are all the above compatible? 

does an elf reader exists which does a dlopen (or very near equivalent)?

if the generated c file is compiled (with e.g. -fpic -shared on amd64/linux)
does the so compiled .so file is equivalent to the elf shared object (are
the symbols the same)? and to the JIT-ed memory module?

are machine code quality of JIT-ed memory module or of elf shared object
comparable?

i'm also suggessting adapting the simple JIT examples (or providing new
ones) to possibly emit c file or elf shared object?

how to delete the code in a JIT-ed in-memory module?

i cannot figure out how to canonically get the host target (ie the
TargetMachine argument to ElfWriter) when configured with
'--enable-targets=host-only' - shouldn't we have only one TargetMachine in
that case? Mayvbe a static TargetMachine* TargetMachine::getHostTarget()
function could help?


Regards, and thanks for reading.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 
8, rue de la Faïencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***




More information about the llvm-dev mailing list