Subject: Re: Linking against Linux binary modules
To: Christos Zoulas <>
From: Eric Haszlakiewicz <>
List: current-users
Date: 09/28/2006 12:53:27
On Thu, Sep 28, 2006 at 12:46:20PM +0000, Christos Zoulas wrote:
> In article <>,
> Thor Lancelot Simon  <> wrote:
> >How, for example, do you intend to solve the problem that many functions
> >in the C library in Linux have the same name, but different signatures
> >than their NetBSD counterparts?
> It is also sizes of structs. You'll need to wrap most of them with small
> translation shims and then call the real linux code. Same for syscalls that
> do not have the same numbers. Finally you need to fake other ELF library
> dependencies.

	Right, but you only have to do that for the linux functions that you use
from NetBSD code.  Then the shim does:
	convert args
	syscall to switch emul mode to linux
	call linux func
	syscall to switch emul mode back to netbsd
	convert return values
but anything the linux func calls would be just other linux funcs.

i.e. basically the exact same thing the in-kernel emul code does, but the
other way around.