all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado@elephly.net>
Cc: Andy Wingo <wingo@igalia.com>, guix-devel <guix-devel@gnu.org>,
	26048@debbugs.gnu.org
Subject: bug#26048: ‘core-updates’ is back!
Date: Tue, 05 Sep 2017 16:57:40 +0200	[thread overview]
Message-ID: <87zia9p50b.fsf@gnu.org> (raw)
In-Reply-To: <87h8whuvpx.fsf@elephly.net> (Ricardo Wurmus's message of "Tue, 05 Sep 2017 15:21:46 +0200")

Ricardo Wurmus <rekado@elephly.net> skribis:

> Andy wrote:
>
>> It would be pretty cool if we could fix our O(n^2) problems in search
>> paths in this core-updates -- basically whenever you go to create an
>> environment, instead of making e.g. VAR=A:B:C:..., for all VARs
>> (LIBRARY_PATH, PKG_CONFIG_PATH, etc), instead we make a union directory
>> Z containing the union of A, B, C, etc and set VAR=Z.  The goal would be
>> to fix quadratic run-time lookup costs by replacing it with a
>> compile-time computation.  This applies to many lookups: PATH, -rpath,
>> etc.
>
> Ludo wrote:
>
>> A possible alternative solution for ld.so is at
>> <https://bugs.gnu.org/26048>.
>
> Do you know of any negative side effects this would have?  For example,
> would it not become impossible to override libraries at runtime with
> LD_LIBRARY_PATH or LD_PRELOAD when “-lfoo” is replaced by the absolute
> file name of the “foo” library?

Good question.  Per the ELF v1.2 spec¹ (page 82), setting DT_NEEDED to
an absolute file name would prevent overriding via LD_LIBRARY_PATH,
which is not desirable.

It turns out we cannot even set DT_NEEDED to an absolute file name in
the first place, because ld records the DT_SONAME of the library, when
it’s available (which is the case most of the time), rather than its
file name.

IOW, the approach suggested in <https://bugs.gnu.org/26048> isn’t really
applicable.  :-/

Ludo’.

¹ http://refspecs.linuxbase.org/elf/elf.pdf

      reply	other threads:[~2017-09-05 14:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 22:01 ‘core-updates’ is back! Ludovic Courtès
2017-08-29  8:44 ` Efraim Flashner
2017-08-30  9:30   ` Efraim Flashner
2017-08-30 19:10     ` Marius Bakke
2017-08-30 20:16       ` Efraim Flashner
2017-08-30 20:37         ` Marius Bakke
2017-08-31 14:44           ` Ludovic Courtès
2017-08-31 16:23             ` Marius Bakke
2017-08-31 17:18               ` Marius Bakke
2017-09-02 11:18                 ` Marius Bakke
2017-09-02 21:01               ` Ludovic Courtès
2017-08-30 21:17       ` Ricardo Wurmus
2017-08-30 21:51         ` Marius Bakke
2017-08-29  9:14 ` Andy Wingo
2017-08-29 10:01   ` Ricardo Wurmus
2017-08-29 13:36   ` 宋文武
2017-08-30  9:58     ` Ludovic Courtès
2017-08-30  9:58   ` Ludovic Courtès
2017-09-05 13:21     ` Ricardo Wurmus
2017-09-05 14:57       ` Ludovic Courtès [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=87zia9p50b.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=26048@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    --cc=wingo@igalia.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.