[LLVMdev] Compiler Driver Decisions

Reid Spencer reid at x10sys.com
Wed Aug 4 12:36:26 PDT 2004


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:

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.)
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.

Reid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040804/d8ff9f02/attachment.sig>


More information about the llvm-dev mailing list