From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9408 invoked from network); 6 May 1998 09:20:27 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (7795@203.24.36.3) by ns1.primenet.com.au with SMTP; 6 May 1998 09:20:27 -0000 Received: (qmail 7326 invoked from network); 6 May 1998 09:20:25 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns2.primenet.com.au with SMTP; 6 May 1998 09:20:25 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id EAA11130; Wed, 6 May 1998 04:58:27 -0400 (EDT) Resent-Date: Wed, 6 May 1998 04:58:27 -0400 (EDT) From: Andrew Main Message-Id: <199805060855.JAA20210@taos.demon.co.uk> Subject: Re: PATCH: dynamic loading on AIX To: hzoli@cs.elte.hu (Zoltan Hidvegi) Date: Wed, 6 May 1998 09:55:08 +0100 (BST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <199805060646.BAA02655@hzoli.home> from "Zoltan Hidvegi" at May 6, 98 01:46:14 am X-Loop: zefram@tao.co.uk X-Phase: The Moon is Waxing Gibbous (78% of Full) X-Stardate: [-30]1111.85 X-US-Congress: moronic fuckers X-Headers: OTT X-Mouse: +++ ????? +++ Out Of Cheese Error. Redo From Start. X-Parrot: no, it's only resting. X-Personality: INTJ X-email-is-not-HTML: X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"sBA3P2.0.oj2.oO2Kr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3934 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zoltan Hidvegi wrote: >The patch below implements dynamic loading on AIX. AIX 4.1 and older >versions do not support the dlopen/dlsym interface. Instead each object >has an export and an import list. The export list contains the list of >symbols which is provided by the object for use by subsequently loaded >dynamic modules. This is interesting. I've been planning for some time to do a manual implementation of symbol tables, much like this, to allow dependent module loading on systems such as SunOS, where symbols from one loaded module are not available to other modules. Presumably much of the export list handling code can be shared between these two uses. Probably we could also use the export list to reduce the size of symbol tables on some systems where the symbols are handled completely automatically. >The setterm, refresh and cs external symbols had a conflict with the AIX >C library or with the curses library so they were renamed to zsetterm, >zrefresh and zshcs respectively. `cs' was not changes in the source >files, instead cs is #defined to zshcs in system.h. It also #defined ll >just for consistency, since cs and ll are usually used together. I chose >the #define solution since cs is used too many places. I'd like to do a proper solution to this sort of problem. I've been thinking along the lines of automatically #defineing each symbol `foo' to `name_of_module__foo', thus avoiding clashes with both the C library and other modules. > It is possible to >autogenerate export files from the .pro files, and I do have a script >which does that, but that creates an export file with 636 symbols for zsh >and 282 symbols for zle, which the current modules use only 233 symbols >from zsh.export and 8 symbols from zle.export. Making the export list >smaller speeds up loading, reduces memory usage and reduces the risk or >name collisions. Perhaps it would be better to add a dummy keyword to the declarations, to flag symbols for export from the module. -zefram