From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28834 invoked from network); 7 Jun 2001 10:18:25 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jun 2001 10:18:25 -0000 Received: (qmail 12125 invoked by alias); 7 Jun 2001 10:18:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14786 Received: (qmail 12100 invoked from network); 7 Jun 2001 10:18:06 -0000 Subject: Re: Modules dependencies RE: PATCH: zftp/tcp abstraction In-Reply-To: <000701c0ef35$fc04ebe0$21c9ca95@mow.siemens.ru> from Andrej Borsenkow at "Jun 7, 2001 01:41:10 pm" To: Andrej Borsenkow Date: Thu, 7 Jun 2001 11:18:18 +0100 (BST) CC: zsh-workers@sunsite.dk X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Andrej Borsenkow wrote: >To make it work in general every module needs a standard function, let's >call it dep_, that is autogenerated out of moddeps and called before module >is attempted to be loaded to register dependencies. Problem is you can't call that function without loading the module, and you can't successfully load the module until you've got that information. If there were an easy solution we'd have implemented it as soon as we came up with the module system. Basically we want to be able to read the list of dependencies before we load the module. The best idea I came up with was to concatenate the list onto the end of the shared object file -- so it can be read from the file before we invoke the dynamic linker -- but in the general case this could interfere with the shared object file format enough that the dynamic linker might reject it. Another possibility is to put the dependency list in a separate file, and install the two files (shared object and dependency list) whenever we want to install the module. Neither of my solutions is completely satisfactory, but it now seems that we are making sufficient use of interdependent modules that we need some form of implicit dependencies. -zefram