From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25750 invoked from network); 19 Jan 2004 05:26:02 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Jan 2004 05:26:02 -0000 Received: (qmail 20215 invoked by alias); 19 Jan 2004 05:25:48 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7004 Received: (qmail 20197 invoked from network); 19 Jan 2004 05:25:48 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Jan 2004 05:25:48 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [68.1.17.116] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Jan 2004 5:25:47 -0000 Received: from quark.localdomain ([68.12.75.33]) by lakemtao05.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040119052547.RCDC29834.lakemtao05.cox.net@quark.localdomain>; Mon, 19 Jan 2004 00:25:47 -0500 Received: from quark.localdomain (localhost.localdomain [127.0.0.1]) by quark.localdomain (8.12.9/8.12.9) with ESMTP id i0J5PtuO033600; Sun, 18 Jan 2004 23:25:55 -0600 (CST) (envelope-from vince@quark.localdomain) Received: (from vince@localhost) by quark.localdomain (8.12.9/8.12.9/Submit) id i0J5PslT033599; Sun, 18 Jan 2004 23:25:54 -0600 (CST) Date: Sun, 18 Jan 2004 23:25:52 -0600 From: Vincent To: Dominic Mitchell Cc: zsh-users@sunsite.dk Subject: Re: loading dynamic modules in a static shell Message-ID: <20040119052552.GA32753@quark.localdomain> References: <20040118121441.GA29157@quark.localdomain> <20040118153107.GA55970@ppe.happygiraffe.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040118153107.GA55970@ppe.happygiraffe.net> User-Agent: Mutt/1.4.1i On Sun, Jan 18, 2004 at 03:31:07PM +0000, Dominic Mitchell wrote: > On Sun, Jan 18, 2004 at 06:14:42AM -0600, Vincent wrote: > > Is it supposed to be possible to compile a static shell with part of > > the modules built in and to be able to load the remaining modules with > > zmodload? > > I compiled zsh-4.0.9 configured with > > "configure --enable-ldflags=-static", installed it, then reconfigured > > it as shared, did a "make modules" and installed the dynamic modules. > > However, when I try loading one of the dynamic modules that are not > > statically linked in, such as zftp, it just says > > "zsh: failed to load module: zsh/zftp". > > > > I built a static shell to install in /bin on FreeBSD but did not want > > it be so big with every module compiled in. > > I think it depends upon the capabilities of the platform's dynamic > loader. Certainly for FreeBSD you won't be able to do this. This is > because all dynamic loading is disabled when a static binary is used. > For the current release (5.2) the root filesystem has been made dynamic > in order to get this working (for the nsswitch stuff to work correctly). Thanks for the reply. I did not realize that. I could have sworn I remembered compiling programs before with mixed linking, where some libs I specified as "/usr/lib/xxx.a" while others were dynamic, specified with "-lxxx". Perhaps that was when I was running Linux. I guess, for now, I just have to make a bloated executable in order to have a statically linked shell. Perhaps I will try again later when I upgrade from FreeBSD-5.1 to 5.2. > I'm trying to remember the reasons why this is the case, but I can't > quite recall them. But if you search the freebsd-current mailing list > archives for "dynamic root", that should provoke some enlightening > discussion. > > -Dom I scanned through some of the postings. It did enlighten me on another unrelated issue. I was wandering why a lot of the newer ports were failing to run because they were linked using /libexec/ld-elf.so.1 rather than /usr/libexec/ld-elf.so.1. Apparently it is related to this changeover to a "dynamic root" that you mentioned. I though some of the ports maintainers were just goofing up :-). Thanks. Vincent -- Avoid the VeriSign/Network Solutions domain registration trap! http://www.InetAddresses.net