Subject: Re: Compiling NetBSD with another compiler.
To: De Zeurkous <zeurkous@nichten.info>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-userlevel
Date: 10/14/2007 13:04:35
--OROCMA9jn6tkzFBc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Oct 13, 2007 at 03:38:55PM -0000, De Zeurkous wrote:
> Haai,
>=20
> >[no quote]
>=20
> One question -- why not modify the syscall entry code to handle
> compatibility?
>=20
> if( compatmode =3D=3D COMPAT_16 ) return compat_stat16( path, sh ); // an=
d teh
> like...

How do you know what compat mode the application was built for? Thus how=20
do you know what the "compatmode" variable should be?

My understanding of how ELF is supposed to work is you aren't supposed to=
=20
do things like this.

Also, it'd get really messy since it really might be if ((compatmode =3D=3D=
=20
COMPAT_16) || (compatmode =3D=3D COMPAT_15)) and so on. That makes code mes=
sy=20
and also puts a lot of compatability modes checking in the fast-path. What=
=20
we've done makes the compiler just need to pick the right name at compile=
=20
time.

Take care,

Bill

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

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

iD8DBQFHEnZSWz+3JHUci9cRAu8fAJ94rRQASP9TlqoBXqqpHQq9SNHsQwCgmVw9
AZnFvwd3JV+44TmzyX5lPNs=
=BXts
-----END PGP SIGNATURE-----

--OROCMA9jn6tkzFBc--