Subject: Re: Fat binaries
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 04/12/1995 15:38:57
> [make the C compiler produce p-code, and put the p-code runtime in
> the kernel, which may be acceptable if the p-code is simple]

> This would, of course, be obscenely slow, but [...] /sbin/init
> doesn't have a lot of work to do [...]  [P]erhaps the p-coded
> /sbin/init need not be coded in C, thus avoiding the work of
> rewriting the C compiler.

I've set up several Sun-3s as X terminals by making /etc/init a shell
script.  It's always struck me as somewhat twisted, but it seems to me
to be a good example of how UNIX's preference for simple orthogonal
mechanisms results in unexpected power down the road.

> (Fancy that, adding an "assembly language" module to *enhance*
> portability; maybe this approach is worth taking just for that. ;-)

:-)

> (The p-code /sbin/init described above does so little with so much
> kernel help that kernel probably ought to just go find
> /sbin/init.ARCH itself anyway.)

There is actually a very simple solution.  Make the kernel effectively
stat /sbin/init; if it's a directory, exec /sbin/init/`arch` instead.
Small, simple, almost entirely leveraged on existing code, fully
generalizable, and damn near zero overhead if you don't use it: what
more do you want?

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu