[LLVMdev] Compiler Driver Decisions

John Criswell criswell at cs.uiuc.edu
Wed Aug 4 12:50:33 PDT 2004


Reid Spencer wrote:
> On Wed, 2004-08-04 at 12:21, John Criswell wrote:
> 
>>In regards to Misha's comments about the automatic execution of bytecode 
>>files, there are several ways to do it:
>>
>>1) Have bytecode files start with #!<JIT/llee/whatever> (portable)
>>2) Encapsulate with ELF
>>3) Register the type with the kernel (Linux only)
>>
>>I don't really care for the llee approach, as it can be broken with 
>>subsequent LD_PRELOADs, requires that I enter an alternative execution 
>>environment, and requires that I remember to run llee.  I believe the 
>>methods above are less error-prone and integrate into the system more 
>>cleanly.
> 
> 
> Unfortunately, the #!... convention is not supported on all operating
> systems although it is very common on UNIX. I think we're going to end
> up with a mixture of things:

Yes, I know.  I figured other OS's have some other sort of mechanism to 
do the same thing.

> 
> 1. The llee (llvm-run) approach needs to be maintained for those systems
>     where all you can do is run a program (think OS/390, Windows, etc.)

Doesn't Windows have some method of associating extensions to executable 
programs?


> 2. We can do the #! trick now without modifying the bytecode file. We
>     have a convention like this:
>     #!/path/to/llvm-run -
>     llvm......(bytecode)
>     When llvm-run is given the - option, it reads the rest of the file
>     as bytecode. This is how a shell works too.
> 3. We might want to eventually have an installer that registers the type
>     with the kernel but I think that's a long way off. We should
>     concentrate effort on items 1. and 2. above.
> 
> I don't think we need to do any encapsulation with ELF to accomplish the
> same goals.

You are right.  ELF encapsulation was more for the second set of goals 
(i.e. working with pre-existing system tools).

> 
> Reid.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev

-- John T.

-- 
*********************************************************************
* John T. Criswell                         Email: criswell at uiuc.edu *
* Research Programmer                                               *
* University of Illinois at Urbana-Champaign                        *
*                                                                   *
* "It's today!" said Piglet. "My favorite day," said Pooh.          *
*********************************************************************





More information about the llvm-dev mailing list