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 16:01:14
On Tue, Jul 05, 2005 at 13:26:01 +0200, Martin Husemann wrote:

> On Tue, Jul 05, 2005 at 01:45:02PM +0400, Valeriy E. Ushakov wrote:
> 
> > 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.
> 
> Yes, but wouldn't you need a special shim for each library wrapped?

It would depend on the libs.  E.g. if the guestlib depends on X11
libs, and netbsd host has the ABI compatible versions of those X11
libs (which is likely), guestlib can call netbsd X11 libs directly.

libc is special in that guestos is likely to have a slighly (or not so
slighly) incompatible libc, so guestlib need to have a compatibility
shim to call, that takes care about symbols missing in the netbsd
libc, or ABI differences, e.g. different struct stat layout (this is
of course true for netbsd code calling guestlib too).

Another native library to worry about is libpthread, if the guestlib
is thread-aware.

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