Re: ELF dynamic loader name [was: sbrk(2) broken]

From: Alexandre \ <alex.kovalenko_at_verizon.net>
Date: Tue, 08 Jan 2008 19:20:46 -0500
On Tue, 2008-01-08 at 17:04 +1100, Andrew Reilly wrote:
> On Mon, 07 Jan 2008 22:30:18 -0500
> "Alexandre \"Sunny\" Kovalenko" <alex.kovalenko_at_verizon.net>
> wrote:
> 
> > > [I'm doing a lot of my own new coding in PLT scheme at the
> > > moment, and having a ball with it.  (lang/drscheme in ports)  
> > 
> > I suspect you are not running contemporary 7.0 there:
> > twinhead# uname -a 
> > FreeBSD twinhead.rabbitslawn.verizon.net 7.0-RC1 FreeBSD 7.0-RC1 #0: Tue
> > Jan  1 19:22:56 EST 2008
> > root_at_twinhead.rabbitslawn.verizon.net:/usr/obj/usr/src/sys/TWINHEAD
> > i386
> > twinhead# make install
> > ===>  drscheme-370 is marked as broken: Fails to install (signal 11).  
> > *** Error code 1
> > 
> > Stop in /usr/ports/lang/drscheme.
> 
> Nope:
> andrew_at_duncan:/usr/home/andrew $ mzscheme
> Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme
> Inc.
> > ^D
> andrew_at_duncan:/usr/home/andrew $ uname -a
> FreeBSD duncan.reilly.home 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE
> #6: Sat Jan  5 17:53:17 EST 2008
> root_at_duncan:/usr/obj/usr/src/sys/DUNCAN  amd64
> 
> :-)
> 
> You'll find a patch with my name on it at:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=118808
> 
> That fix has been incorporated up-stream, so 372 now builds
> cleanly for me from tarballs, but something is still broken on
> jkoshy's 8-current system, so he hasn't updated the port yet.
That will teach me to check PR database before speaking up. Thank you
for both the patch and the pointer.

> 
> > > Fast enough for what I'm doing, byte-code, static or JIT compiled,
> > > and runs everywhere (including Windows and OSX).]
> > > 
> > > What would be *really* cool would be the ability to have a JVM or
> > > LLVM back-end in the kernel, as a first-class peer of the ELF
> > > loader.  Anyone know if anyone has tried such a thing on *BSD (or
> > > even Linux, I guess)?  
> > 
> > If you have Linux distribution handy, you can look
> > at /usr/src/linux/Documentation/binfmt_misc.txt.
> 
> Or
> http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html
> Thanks for the pointer: that's pretty close to what I was
> thinking of.  There's also the PE loader work in NetBSD...
> 
> > At least its Java
> > incarnation has been around for a while. I have not seen widespread use
> > of it, but then again, I have not been looking too hard.
> 
> Yeah, most existing foreign-executable formats have lots of
> extraneous environment cruft related to compatibility with
> other operating systems, that doesn't really lend themselves to
> this sort of application.  

Ah, but let's not blame operating systems:

sunny:RabbitsDen>cat Hello.java
class Hello
{
  public static void main(String args[])
  {
    System.out.println("Hello, world!");
  }
}
sunny:RabbitsDen>javac Hello.java
sunny:RabbitsDen>java -version
java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build
1.6.0_03-p3-root_17_nov_2007_12_13-b00)
Java HotSpot(TM) Server VM (build
1.6.0_03-p3-root_17_nov_2007_12_13-b00, mixed mode)
sunny:RabbitsDen>java Hello
Hello, world!
sunny:RabbitsDen>scp Hello.class eclipse:
Hello.class                                                       100%
417     0.4KB/s   00:00    
sunny:RabbitsDen>ssh eclipse
eclipse:DEV:sunny>java -version
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
eclipse:DEV:sunny>java Hello
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)



> [This is more -arch or -talk than -current, so I'll stop now.]
Time to subscribe to arch_at_... ;)

> 
> Cheers,
> 

-- 
Alexandre "Sunny" Kovalenko
Received on Tue Jan 08 2008 - 23:22:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:25 UTC