mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] Allow different paths for static and shared libraries
Date: Sun, 31 May 2015 21:27:25 -0400	[thread overview]
Message-ID: <20150601012725.GU17573@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150531185142.7cf46c31@pirotess>

On Sun, May 31, 2015 at 06:51:42PM -0300, Ismael Luceno wrote:
> On Sun, 31 May 2015 12:30:34 -0400
> Rich Felker <dalias@libc.org> wrote:
> > On Sun, May 31, 2015 at 06:10:54AM -0300, Ismael Luceno wrote:
> > > On Sun, 31 May 2015 03:31:57 -0400
> > > Rich Felker <dalias@libc.org> wrote:
> > > > On Sun, May 31, 2015 at 04:24:25AM -0300, Ismael Luceno wrote:
> > > > > Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
> > > > > ---
> > > > >  Makefile  | 5 ++++-
> > > > >  configure | 3 +++
> > > > >  2 files changed, 7 insertions(+), 1 deletion(-)
> > > > > [...]
> > > > 
> > > > Is there a motivation/intended-usage-case for this patch?
> > > 
> > > libc.so must be available at boot, while the static libraries don't
> > > need to, so installing to different paths comes useful.
> > 
> > In that case I think you're not looking for the semantics of slibdir
> > but rather using it as a mechanism to make ldso available before
> > libdir is mounted.
> > 
> > Note that having libc.so and libc.a in different dirs is very
> > problematic/dangerous at linking time. If the dir containing libc.a is
> > searched first, then it will get linked into dynamic-linked binaries
> > and very bad things will happen.
> > 
> > I think this is probably yet another case of wanting ldso to be the
> > canonical file and libc.so to be a symlink to it (reversing symlink
> > direction). This issue has come up many times before but I always
> > forget how it was resolved (or not) and why nothing changed...
> 
> A ld script in place of libc.so, containing "GROUP ( /lib/libc.so )",
> would workaround that.

Are you sure? I think that would result in a dependency for
"/lib/libc.so" getting put in the binary rather than one for
"libc.so", and that's also a serious bug.

Rich


  reply	other threads:[~2015-06-01  1:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-31  7:24 Ismael Luceno
2015-05-31  7:31 ` Rich Felker
2015-05-31  9:10   ` Ismael Luceno
2015-05-31 16:30     ` Rich Felker
2015-05-31 21:51       ` Ismael Luceno
2015-06-01  1:27         ` Rich Felker [this message]
2015-06-01 18:41           ` Ismael Luceno
2015-06-01 18:58             ` Rich Felker
2015-06-01 18:54           ` Daniel Cegiełka
2015-06-06 18:21             ` Anthony G. Basile

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=20150601012725.GU17573@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.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 public inbox

	https://git.vuxu.org/mirror/musl/

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).