From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 17 Feb 2010 14:31:09 +0100 From: Enrico Weigelt To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20100217133109.GA10816@nibiru.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [9fans] Binary format Topicbox-Message-UUID: d49531b8-ead5-11e9-9d60-3106f5b1d025 Hi folks, just curious: which binfmt does Plan9 use ? How are share libraries handled (if they exist at all) ? Inspired by recent discussions @ gentoo-user, I'm thinking a bit how an simple and efficient binfmt could look like. Some key ideas are: * purely runtime information (no debug stuff, etc) * everthing's sharable/relocatable module, with strict dependencies * on exec() the process image will be constructed the modules along the dependency tree (the main program as root) * each module may have an entry point (main module w/o is allowed, even if it wouldn't make much sense ;-o), these are called after relocation, along the dependency tree, from leaf to root. * 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. cu -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weigelt@metux.de mobile: +49 174 7066481 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------