From: Florian Weimer <fw@deneb.enyo.de>
To: "Wangbing(wangbing,
RTOS/Poincare Lab) via Libc-alpha" <libc-alpha@sourceware.org>
Cc: "Wangbing(wangbing,RTOS/Poincare Lab)" <wangbing6@huawei.com>,
Nixiaoming <nixiaoming@huawei.com>
Subject: Re: [PATCH] dlsym: Add RTLD_PROBE for situation when dlsym only wants to probe a symbol but not use it
Date: Tue, 27 Sep 2022 12:40:31 +0200 [thread overview]
Message-ID: <87mtalxfq8.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <efbc56f827194b87878392540b88fa12@huawei.com> (Wangbing via Libc-alpha's message of "Tue, 27 Sep 2022 09:21:04 +0000")
* Wangbing via Libc-alpha:
> dlsym with RTLD_DEFAULT add dependency for target symbol, if program
> use dlsym only to detect if a symbol exist, and will not use it.
>
> this operation will make unable to dlclose so file containing target
> symbol, add RTLD_PROBE to support symbol probe.
I'd appreciate if you could write a test case for this functionality.
I'm not sure if the new functionality is needed. If we document that
a struct link_map * obtained from _dl_find_object or via
_r_debug.r_map can be used as an argument to dlsym (and other places
where a DSO handle is currently accepted), programmers could use that
to get this effect. I believe this works today (as an undocumented
feature) and does not record the dependency.
prev parent reply other threads:[~2022-09-27 10:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 9:21 Wangbing(wangbing,RTOS/Poincare Lab)
2022-09-27 10:40 ` Florian Weimer [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=87mtalxfq8.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=libc-alpha@sourceware.org \
--cc=nixiaoming@huawei.com \
--cc=wangbing6@huawei.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).