From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: weigelt@metux.de, 9fans@9fans.net Date: Wed, 17 Feb 2010 08:38:22 -0600 From: blstuart@bellsouth.net In-Reply-To: <20100217133109.GA10816@nibiru.local> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Binary format Topicbox-Message-UUID: d4c78b72-ead5-11e9-9d60-3106f5b1d025 > * the whole loader sits in the kernel (maybe w/ some additional > helper deamon in userland), but userland can pass parameters > like search pathes, etc via env. > > IMHO having the dynamic loader in kernel-land (in contrary to ELF > on GNU) not just removes the need for lots of syscalls, but allows > a lot of optimizations, eg. code sharing w/ mmap() or caching > relocation data. If you're interested in how to do dynamic loading in a clean and elegant way, take a look at Inferno. Along the lines of what you're suggesting, everything is a module. The only thing necessary to make a module suitable as a program to run from the command line is the existence of a function called init() with a particular signature. After studying and working with it, all of the other dynamic loading implementations out there are... well the word that comes to mind is 'disgusting.' BLS