Subject: Re: Quick and dirty embedded OS
To: Juha-Matti Liukkonen <jml@cubical.fi>
From: Ian Lance Taylor <ian@wasabisystems.com>
List: tech-embed
Date: 10/20/2004 01:31:01
Juha-Matti Liukkonen <jml@cubical.fi> writes:

> Second, all application code you run must be (statically linked, which
> I'll ignore as impractical for most purposes, or) relocatable -
> because the different instances cannot obviously see the same start
> address when memory is not mappable. Regular unix binaries by default
> aren't relocatable, but .so's are. Theoretically a single address
> space solution could be devised with proper compilation flags, and
> potentially modifications to the program loader. You can simulate this
> by writing a process which loads executable code dynamically from
> shared object files - into a single shared address space.

A more serious issue is how to handle fork without an MMU.  A call to
fork implies duplicating the user's data structures at a different
memory address, and there is no general way to do that.

uClinux gets around this by not providing fork at all.  It only
provides vfork.

Ian