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:47:29 +0000	[thread overview]
Message-ID: <20151105124729.674d29df@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <5294509.qASjPjACe2@kdudka.brq.redhat.com>

On Thu, 5 Nov 2015 13:39:20 +0100
Kamil Dudka <kdudka@redhat.com> 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


      reply	other threads:[~2015-11-05 12:47 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
2015-11-05 12:39     ` Kamil Dudka
2015-11-05 12:47       ` Peter Stephenson [this message]

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=20151105124729.674d29df@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).