Subject: Re: Mixing NetBSD and Linux shared libs
To: Paulo Alexandre Pinto Pires <>
From: Eric Haszlakiewicz <>
List: current-users
Date: 04/18/2002 01:32:40
On Thu, Apr 18, 2002 at 01:36:41AM -0300, Paulo Alexandre Pinto Pires wrote:
> Surprisingly (to me, at least), the JNI examples from Sun's
> documentation worked fine with NetBSD native shared libs (since I don't
> have Linux development tools handy at home), even though the JVM is a
> Linux program.  Can I expect more complex shared objects to also work?
	really!?!? You mean you compiled some JNI code from Sun and it worked?
I find that rather hard to believe, but I suppose you could have gotten
extemely lucky.  Any idea at what point in the ktrace you were in netbsd
code?  How many syscalls were done at that point?
	Taking a quick look at the syscalls.master files, at least open() and
write() have the same number and similar arguments, so you probably would have
been able to at least write to a file.

> What about the other way around, that is having NetBSD dynamically link
> Linux object files?  We'd then be able, for example, to use Linux Java
> 1.3.1 plugin for Netscape 6 under a native Mozilla.
	I think it might be possible, but you'd need to get the dynamic linker
to set up wrappers for each call from the netbsd code to the linux code
(and vice versa) that would switch the emulation (with a new system call).
That seems like it would be rather difficult.  You'd also have to do
something about any calling interface differences, which would probably be
even harder and more fragile.  So... good luck, although it would be a super
cool feat to get something like that working.