From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: dynamic linking (Re: [musl] musl and android)
Date: Thu, 15 Jan 2015 07:15:36 -0500 [thread overview]
Message-ID: <20150115121536.GO4574@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150115120004.GY14316@example.net>
On Thu, Jan 15, 2015 at 01:00:05PM +0100, u-wsnj@aetey.se wrote:
> On Thu, Jan 15, 2015 at 06:01:58AM -0500, Rich Felker wrote:
> > copy of the dynamic linker (libc.so/ld-musl) in the package
> > and executing the program via a wrapper script that manually invokes
> > the dynamic linker (so the hard-coded PT_INTERP pathname isn't
> > needed).
>
> > But these are not the approaches I'd like to be
> > recommending in the long term... :(
>
> Actually I believe (and know from long time experience) this to be
> the only "sane"/robust/general way to run dynamically linked executables.
It depends on your perspective. If you're viewing them as
self-contained entities, then yes, but if you're viewing them as
something running in an existing library ecosystem, there's no
problem.
> I don't think that the implications of hardcoding the interpreter
> path were well understood when dynamic linking was first deployed,
> the hardcoding merely became percepted as the only/natural approach
> when the purpose was to cheaply imitate the behaviour of statically
> linked programs. (This mimics the #!/... which is similarly
> limited/broken. The plain text scripts are though relatively easy
> to modify to hack around the limitation, according to local curcumstances)
I think this could be fixed easily by having the kernel support
$ORIGIN in PT_INTERP.
Rich
next prev parent reply other threads:[~2015-01-15 12:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 9:13 musl and android Рысь
2015-01-15 11:01 ` Rich Felker
2015-01-15 12:00 ` dynamic linking (Re: [musl] musl and android) u-wsnj
2015-01-15 12:15 ` Rich Felker [this message]
2015-01-15 13:04 ` u-wsnj
2015-01-15 13:34 ` Rich Felker
2015-01-15 15:56 ` OT: " u-wsnj
2015-01-15 13:53 ` musl and android Рысь
2015-01-18 6:32 ` Рысь
2015-01-18 6:44 ` Rich Felker
2015-01-18 8:01 ` Рысь
2015-01-18 16:40 ` Rich Felker
2015-01-19 18:00 ` Рысь
2015-01-21 10:34 ` Рысь
2015-01-21 18:36 ` Rich Felker
2015-01-22 2:37 ` Рысь
2015-01-31 15:08 ` Рысь
2015-02-03 5:52 ` Rich Felker
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=20150115121536.GO4574@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).