Subject: Re: Linking against Linux binary modules
To: Joerg Sonnenberger <joerg@NetBSD.org>
From: Quentin Garnier <cube@cubidou.net>
List: current-users
Date: 09/28/2006 15:58:47
--xtcA6s3naMKOsC7S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 28, 2006 at 12:15:40PM +0000, Joerg Sonnenberger wrote:
> On Thu, Sep 28, 2006 at 07:46:56AM -0400, 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?
>=20
> The idea I discussed e.g. with Uwe was to introduce an optional translati=
on
> layer in ld.so.  Basically, what is needed is a third argument for dlopen
> to specify a translation function which will be used for all further
> namespace operations (e.g. rpath entries, NEEDED names, symbol names).
> The rest of the processing can be kept as normal ELF usage.
>=20
> So socket() would be translated to __linux_socket which is provided by a =
wrapper
> DSO.

AKA "in case maintaining compat_linux(4) wasn't painful enough, here is
compat_linux(3)".

Well, if someone is brave enough to do it, he has my support :-)

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--xtcA6s3naMKOsC7S
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iQEVAwUBRRvVF9goQloHrPnoAQKc2gf/fQQNKSSeUpMJPJvM/67uRzK6iprvn26Y
qriovsBsNL/uuqoEruv1xvKg3sxxwRnBw/rirZGHENzKvxCjXIX1TKjbEq3YLdG4
Tque0Gr/ZK0XUKml8llt0GKV/vs/Qiv8snJtqalp0ZPbt12xaU0OCPQ3DmKx7wEt
auQpYjBbqzX+qPl5hOtxtymyoQvbzd8tUjQEF6dYbHSJf80Iq1dDTFUz/HKV4zuT
+oGx65iPrU3sTjt1nRvnQx1NftoJbh86kPwhzDKukT1MAwAtMZ7Jd+D7hlgmw0pc
rm77el/mf8DZziYrMFrj9mxHk/KbVXZEJPQhUxlunumg+wgNOqQh7g==
=3HbX
-----END PGP SIGNATURE-----

--xtcA6s3naMKOsC7S--