From: Vincent <zsh@hightek.org>
To: Dominic Mitchell <dom@happygiraffe.net>
Cc: zsh-users@sunsite.dk
Subject: Re: loading dynamic modules in a static shell
Date: Sun, 18 Jan 2004 23:25:52 -0600 [thread overview]
Message-ID: <20040119052552.GA32753@quark.localdomain> (raw)
In-Reply-To: <20040118153107.GA55970@ppe.happygiraffe.net>
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
next prev parent reply other threads:[~2004-01-19 5:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-18 12:14 Vincent
2004-01-18 15:31 ` Dominic Mitchell
2004-01-19 5:25 ` Vincent [this message]
2004-01-19 7:35 ` Dan Nelson
2004-01-18 18:39 ` Bart Schaefer
2004-01-19 5:37 ` Vincent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040119052552.GA32753@quark.localdomain \
--to=zsh@hightek.org \
--cc=dom@happygiraffe.net \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).