Subject: Re: dlopen(0, 1) should work?
To: Jason Thorpe <firstname.lastname@example.org>
From: Simon J. Gerraty <email@example.com>
Date: 03/03/1998 09:11:49
> What exactly does the Java engine need to know? All of this is going
> to be very different on systems that use Elf, e.g. the Alpha.
Basically, because it needs to wrap a bunch of syscalls to handle
async IO, it wants to get a handle for libc.so and then get the
address of read,write etc in that shared object.
I think that one could be achieved by just using dlsym(0,...).
More interesting is finding the path to libjava.so, so that the value
of JAVA_HOME can be determined (if the VM was not started using a full
path). JAVA_HOME is used to set a reasonable default classpath.
Perhaps a more specific call like
const char *dlpath(void *handle, char *symbol)
that just returned the pathname of the underlying file or NULL.