[LLVMdev] Problem executing code with lli...

Frits van Bommel fvbommel at wxs.nl
Sun Oct 26 14:48:54 PDT 2008


Karhu, Abhinav R wrote:
> Hey all,
> I am getting this weird error which suddenly popped up today.
> Whenever I am trying to execute a piece of code using lli I get this following error.
> 
> Error loading program 'sample.bc': Invalid bytecode signature: 464C457F (Vers=0, Pos=4)
> 
> I dont know what to do..Please reply to this question. Please...

That signature is "\x7fELF" read as a 32-bit little-endian integer. It's 
not a bytecode file but an object file, executable or dynamic library. 
Did you perhaps forget to tell your compiler to generate LLVM IR as 
output? (llvm-gcc needs '-emit-llvm' on the command line to do so, 
otherwise it defaults to the native format. Such as ELF if you're on Linux)



More information about the llvm-dev mailing list