From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23680 invoked from network); 10 Feb 1997 16:16:43 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 10 Feb 1997 16:16:43 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id KAA12755; Mon, 10 Feb 1997 10:42:09 -0500 (EST) Resent-Date: Mon, 10 Feb 1997 10:42:09 -0500 (EST) Date: Mon, 10 Feb 1997 18:44:43 +0300 (MSK) From: Andrej Borsenkow X-Sender: bor@itsrm1.mow.sni.de Reply-To: borsenkow.msk@sni.de To: Peter Stephenson cc: Zsh hackers list Subject: Re: Shared libraries on IRIX In-Reply-To: <199702101047.LAA12714@hydra.ifh.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"n0_B71.0.B73.G7q_o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2892 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mon, 10 Feb 1997, Peter Stephenson wrote: > I hadn't been able to get shared libraries to work on IRIX and I > think the following, from the dlopen(3) manual, was the problem. > > Objects loaded by a single invocation of dlopen may import symbols from > one another or from any object loaded automatically during program > startup, but objects loaded by one dlopen invocation may not directly > reference symbols from objects loaded by a different dlopen invocation. > Those symbols may, however, be referenced indirectly using dlsym. > Yes; this is exactly what happens on my system (Sinix-N 5.42). dlopen() has a flag (RTLD_GLOBAL) which should make symbols from one module available for other dlopen() calls. zsh calls dlopen() with RTLD_GLOBAL, but alas! it forces it to be 0 if not defined. (Speaking about my system - RTLD_GLOBAL is supported in the next version first :-( > This fits in with my experiences: problems happen when the zle module > is loaded, which depends on another module, comp1. The latter loads > all right but zle starts acting strangely straight away (the address > for the init routine is not sensible) and the shell crashes on entry > to zleread(). > Well, I get errors right away - it complaints about no being able to resolve some symbol from comp1. > Looking at the code in the light of this, it will make things very > hard for zle add-on modules even if zle were loaded in one go. I > suspect that (for IRIX and perhaps others) it's going to be necessary > to have zle hard-wired, at least until it's possible to restrict > modules to a pre-defined set of hooks into zle. > Probably, configure has to check, if RTLD_GLOBAL is defined (is it on IRIX?). Is there a system, which does _not_ need RTLD_GLOBAL to export symbols between dlopen() calls? > Anyway, I added comp1 and zle to modules-bltin by hand and everything > else seems fine with dynamic loading. This should therefore become > the default for IRIX, even with --dynamic; I couldn't see code for it > in configure.in, though. > What would be fine, is the ability to statically link modules in zsh main distribution, but still retain dynamic modules feature. greetings ------------------------------------------------------------------------- Andrej Borsenkow Fax: +7 (095) 252 01 05 SNI ITS Moscow Tel: +7 (095) 252 13 88 NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de -------------------------------------------------------------------------