Subject: Re: NetBSD binary compatibility for libraries
To: None <tech-kern@NetBSD.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-kern
Date: 07/05/2005 13:45:02
On Tue, Jul 05, 2005 at 11:18:07 +0200, Alan Barrett wrote:

> > 2b) exe - NetBSD executable, lib.so - GuestOS library.
> > 
> > The 2a and 2b support is missing. But this is very interesting cases.
> 
> I would very much like case 2b to work.  I'd like to have a NetBSD/i386
> application link with a (third party, closed source) FreeBSD/i386 or
> Linux/i386 library, and I'd also like to be able to dlopen() such
> libraries.
> 
> This is not easy in the general case, because kernel-level emulation
> data is maintained per process, not for finer-grained memory regions
> within a process.

It should be possible to interpose a shim lib between guestlib and
netbsd libc, that makes guestlib view of things compatible with the
netbsd view of things in userland, not via kernel emul tricks.  Plus
some ld.so magic.

IIUC, FreeBSD flash plugin wrapper does something like this.

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen