From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19045 invoked by alias); 5 Nov 2015 12:27:55 -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: 37067 Received: (qmail 23943 invoked from network); 5 Nov 2015 12:27:53 -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: cbfec7f5-f794b6d000001495-fe-563b48eb413b Date: Thu, 05 Nov 2015 12:17:44 +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: <20151105121744.0d407139@pwslap01u.europe.root.pri> In-reply-to: <20151105115829.2bb4b3d8@pwslap01u.europe.root.pri> References: <5256226.5racBSergM@kdudka.brq.redhat.com> <20151105115829.2bb4b3d8@pwslap01u.europe.root.pri> 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+NgFjrDLMWRmVeSWpSXmKPExsVy+t/xK7qvPazDDBZN07eYcb6f0eJg80Mm ByaP9/uusnmsOviBKYApissmJTUnsyy1SN8ugStj3kT+gl/sFSdOfGFrYFzD1sXIySEhYCLx qfEyO4QtJnHh3nqgOBeHkMBSRonNe54zQTgNTBL/W3axQzhbGSV2vG5lBGlhEVCVeDz5PQuI zSZgKDF102ywuIiAhcTHHyfAxgoL+EpMaOllBbF5BewlpryZAGZzCjhIvFpwFqiXA2hojsSa y1UgYX4BfYmrfz8xQVxkLzHzyhlGiFZBiR+T74GtYhbQkti8rYkVwpaX2LzmLTOILSSgLnHj 7m72CYxCs5C0zELSMgtJywJG5lWMoqmlyQXFSem5RnrFibnFpXnpesn5uZsYIWH8dQfj0mNW hxgFOBiVeHgNqq3ChFgTy4orcw8xSnAwK4nwSslahwnxpiRWVqUW5ccXleakFh9ilOZgURLn nbnrfYiQQHpiSWp2ampBahFMlomDU6qBseK4k/av1Rf1Ohvr7avChSf91uKrP70/Ycc65TPn wufFTqzRLG4MEfJ2FpDrMq/+1t/AwnhvjgqPvqfMglkHkq+/P3LNrqD6Z7OtSsC8K36Zm9lm C2s9X9i85t/jyT7Jq0ImLP5dnFHIfjnheAufRrFeSPGO5xYGXpmtLF+1jA7UHn0r/WqvEktx RqKhFnNRcSIAuKl3q18CAAA= On Thu, 5 Nov 2015 11:58:29 +0000 Peter Stephenson wrote: > I guess we need to generate something like LINKMODS_whatever that > tells it to link against the .so's as libraries? Hmm... actually, maybe it's not that simple. The usually implication with a DLL is that it'll be found automatically by the OS, but that's not what zsh is doing, which is: - get instruction to load zsh/zftp - Open this with dlopen(). Note we have RTLD_LAZY defined to support the following. - Run setup_(). - This executes return (require_module("zsh/net/tcp", NULL) == 1); - This causes us to load tcp.so. - When we enounter any missing link from tcp.so, it gets resolved. I don't know enough about DLLs to say whether resolving the links when zftp.so is created means that dlopen() now expects to be able to load tcp.so itself, in which case it's going to be problematic. I'd suspect the "-z now" business isn't really designed for use with the dlopen RTLD_LAZY flag? pws