From: "Vivek Das Mohapatra" <vivek@collabora.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Fengkai Sun <qcloud1014@gmail.com>, libc-help@sourceware.org
Subject: Re: Enable preloading in dlopen-ed shared libraries?
Date: Tue, 27 Jul 2021 14:23:43 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.2.21.2107271421520.6900@noise.cbg.collabora.co.uk> (raw)
In-Reply-To: <e4d1f4df-fa71-4ca5-ede6-919581c709ae@linaro.org>
> to support on next 2.35 (RTLD_SHARED):
>
> void *h = dlmopen (LM_ID_NEWLM, "othermalloc.so", RTLD_NOW)
> Lmid_t id;
> dlinfo (h, RTLD_DI_LMID, &id);
> dlmopen (id, "lib1.so", RTLD_SHARED | RTLD_NOW);
>
> The lib1.so will then bind its dependencies only on the newly created
> namespace scope (LD_PRELOAD won't be added in this case). So a subsequent
> dlopen ("lib1.so", ...) will return the handler to the lib1.so already
> created in the extra namespace.
>
> (Vivek can correct me if I am wrong here)
That's how it should work, yes. I should probably add a set of tests to
check this exact scenario to the test suite.
next prev parent reply other threads:[~2021-07-27 13:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 8:44 Fengkai Sun
2021-07-23 21:00 ` Adhemerval Zanella
2021-07-24 2:51 ` Fengkai Sun
2021-07-26 19:51 ` Adhemerval Zanella
2021-07-27 13:23 ` Vivek Das Mohapatra [this message]
2021-07-28 6:17 ` Fengkai Sun
2021-07-28 18:09 ` Adhemerval Zanella
2021-07-28 19:02 ` Geoff T
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=alpine.DEB.2.21.2107271421520.6900@noise.cbg.collabora.co.uk \
--to=vivek@collabora.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-help@sourceware.org \
--cc=qcloud1014@gmail.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).