From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23409 invoked by alias); 5 Nov 2015 12:47:37 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37069 Received: (qmail 11636 invoked from network); 5 Nov 2015 12:47:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-db-563b4fe462fd Date: Thu, 05 Nov 2015 12:47:29 +0000 From: Peter Stephenson To: Kamil Dudka , zsh-workers@zsh.org Subject: Re: loading of module's dependencies broken with '-z now' in LDFLAGS Message-id: <20151105124729.674d29df@pwslap01u.europe.root.pri> In-reply-to: <5294509.qASjPjACe2@kdudka.brq.redhat.com> References: <5256226.5racBSergM@kdudka.brq.redhat.com> <20151105115829.2bb4b3d8@pwslap01u.europe.root.pri> <20151105121744.0d407139@pwslap01u.europe.root.pri> <5294509.qASjPjACe2@kdudka.brq.redhat.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHLMWRmVeSWpSXmKPExsVy+t/xa7pP/K3DDK6tNLSYcb6f0eJg80Mm ByaP9/uusnmsOviBKYApissmJTUnsyy1SN8ugSvjclNwwU+OihMLrzA3ME5i72Lk5JAQMJHo 3dTKDGGLSVy4t56ti5GLQ0hgKaPEhObNTBBOA5PEvo7TzBDOVkaJU3d2M4G0sAioSjyZcpYN xGYTMJSYumk2I4gtImAh8fHHCbAVwgK+EhNaellBbF4Be4mW5dPBejkFzCVu79rNDjH0PKPE 67kLWEAS/AL6Elf/fmKCuMleYuaVM4wQzYISPybfA6thFtCS2LytiRXClpfYvOYt2A9CAuoS N+7uZp/AKDQLScssJC2zkLQsYGRexSiaWppcUJyUnmuoV5yYW1yal66XnJ+7iRESyl92MC4+ ZnWIUYCDUYmH16DaKkyINbGsuDL3EKMEB7OSCK+UrHWYEG9KYmVValF+fFFpTmrxIUZpDhYl cd65u96HCAmkJ5akZqemFqQWwWSZODilGhj9ZnLnq+6/31HC/Dkzz+V+0WOtlq6Peycdlw33 sbRm49IVsrqstdHvDV/Gcc75Fs3Wv1b8E7jQU7iiY8YT7t73x97+Yo5s7c1WSuNYeSbX7Bjf va1ru1L3tv522DjnsWUExwm+CXdKipuv78q+x7tNg6tYRcOt2DDOYGVIxZNr9W6/d/52WKHE UpyRaKjFXFScCACQjSuNYQIAAA== On Thu, 5 Nov 2015 13:39:20 +0100 Kamil Dudka wrote: > That was my original impression too. Thanks for the detailed analysis! > I will just tweak our build system not to use the '-z now' linker flag > for zsh modules. In the short term, that's the best bet. (I now realise I got confused and resolution at dlopen() is indeed the point, as it said in the manual you quoted; resolution within the build system is irrelevant.) I've just done a little more research while waiting for some machines to spring back to life and if we *did* want to improve things with "-z now", I think the answer is that in a GNU environment we can give the module setup_() function the "constructor" attribute (and finish_ the "desctructor" attribute). Then the load of dependent modules happens before dlopen()s final checks (I think --- I haven't tested this). Then we don't call setup_() and finish_() by hand. I don't think that gains us all that much, however, and while it looks easy to implement probing the configuration to see if it supports it is a bit hairier. So I'm not sure it's worth the effort. pws