From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22796 invoked from network); 5 Jun 1997 06:09:29 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 5 Jun 1997 06:09:29 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA15252; Thu, 5 Jun 1997 01:54:28 -0400 (EDT) Resent-Date: Thu, 5 Jun 1997 01:54:28 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199706050545.BAA06291@hzoli.home> Subject: Re: modules!?? In-Reply-To: <199706050135.CAA03602@sgi16.york.ac.uk> from Wez Furlong at "Jun 5, 97 02:35:46 am" To: wjf103@york.ac.uk (Wez Furlong) Date: Thu, 5 Jun 1997 01:45:23 -0400 (EDT) Cc: zsh-workers@math.gatech.edu X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"52LsG1.0.Fk3.KIbbp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3205 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > On IRIX zsh 'goes away' when it loads the comp1 module on startup. If it > can't find the comp1 module, it carries on without zle or compctl. > > As a result I am using the non-dynamic version for IRIX. > > Under SunOS, the modules work fine, except: > > When you explicitly zmodload comp1: > > ld.so: Undefined symbol: _fallback_compctlread > > The shell then exits. > > also, > > % zmodload deltochar > ld.so: Undefined symbol: _zmod Perhaps I should have mentioned this in the readme. On some systems modules cannot export symbols to other modules, so the comp1 module has to be compiled into the main binary. configure autodetects these systems, and if you do not create modules-bltin manually, make will create it with comp1 which forces comp1 into the main binary. But really you should never load comp1 manually. Zsh knows that zle needs comp1 and if you try to load zle it will load comp1 first if it doesn't already have it. Perhaps the output of zmodload should include the statically linked modules as well (with some indication that this module is static). This would give the user a more clear picture. The IRIX crash is probably caused by the duplication of the comp1 module. Deltochar have a similar problem, it wants to use the zmod symbol exported by the zle module. The symbols defined by a module can be discovered using dlsym even on these systems, so we may find some way to overcome this limitation. I think it is possible to do that with some script-generated C code. For that we also need a list of exported and imported function for each module and for the main binary, which is also needed for dynamic loading on AIX. The imported function list is hard to portably generate automatically, so these lists will probably have to be maintained by hand (with the help of a script, which can generate this list automatically using nm, ld or some other tool on an OS I have access to). Zoltan