From: i262jq@0w.se
To: musl@lists.openwall.com
Subject: Re: [musl] [PATCH 0/1] ldso: continue searching if wrong architecture is found
Date: Wed, 7 Feb 2024 09:26:31 +0100 [thread overview]
Message-ID: <ZcM+twzp0WHa8EmL@localhost> (raw)
In-Reply-To: <20240207012247.1121273-1-mmayer@broadcom.com>
On Tue, Feb 06, 2024 at 05:22:42PM -0800, Markus Mayer wrote:
> script of the app will set LD_LIBRARY_PATH to the directory containing
[...]
> What we have discovered is that 64-bit applications launched by the
> 32-bit app will fail due to a shared library mismatch. The 32-bit app
This is a known problem with the LD_LIBRARY_PATH semantics.
> The solution:
>
> The shared library loader needs to keep searching the rest of the
> library search path if the library it found in LD_LIBRARY_PATH could not
> be mapped. If the library loader does this, everything will work fine as
> long as the library resides on the system in a well known path.
This would possibly solve your particular case, but not the main trouble
inherent in LD_LIBRARY_PATH (a child process mapping an unexpected
library instance).
A well working solution is to wrap each application binary in a starter
which explicitly runs the dynamic loader with the argument
--library-path <where the libraries are>
(then the path to the application binary and the arguments, of course)
This solves the problems reliably and is well proven.
My 2c
/i262jq
next prev parent reply other threads:[~2024-02-07 8:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 1:22 Markus Mayer
2024-02-07 1:22 ` [musl] [PATCH 1/1] ldso: continue searching if wrong architecture is found first Markus Mayer
2024-02-07 17:30 ` Rich Felker
2024-02-07 19:10 ` i262jq
2024-02-07 19:51 ` Thorsten Glaser
2024-02-08 15:52 ` i262jq
2024-02-07 20:59 ` Markus Mayer
2024-02-07 8:26 ` i262jq [this message]
2024-02-07 16:45 ` [musl] [PATCH 0/1] ldso: continue searching if wrong architecture is found enh
2024-02-07 17:07 ` Thorsten Glaser
2024-02-07 17:54 ` enh
2024-02-07 18:09 ` Colin Cross
2024-04-02 20:59 ` Markus Mayer
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=ZcM+twzp0WHa8EmL@localhost \
--to=i262jq@0w.se \
--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).