zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Kamil Dudka <kdudka@redhat.com>, zsh-workers@zsh.org
Subject: Re: loading of module's dependencies broken with '-z now' in LDFLAGS
Date: Thu, 05 Nov 2015 12:17:44 +0000	[thread overview]
Message-ID: <20151105121744.0d407139@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20151105115829.2bb4b3d8@pwslap01u.europe.root.pri>

On Thu, 5 Nov 2015 11:58:29 +0000
Peter Stephenson <p.stephenson@samsung.com> 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


  reply	other threads:[~2015-11-05 12:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 10:59 Kamil Dudka
2015-11-05 11:58 ` Peter Stephenson
2015-11-05 12:17   ` Peter Stephenson [this message]
2015-11-05 12:39     ` Kamil Dudka
2015-11-05 12:47       ` Peter Stephenson

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=20151105121744.0d407139@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=kdudka@redhat.com \
    --cc=zsh-workers@zsh.org \
    /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).