public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] dlsym: Add RTLD_PROBE for situation when dlsym only wants to probe a symbol but not use it
       [not found] <efbc56f827194b87878392540b88fa12@huawei.com>
@ 2022-09-27 10:40 ` Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2022-09-27 10:40 UTC (permalink / raw)
  To: Wangbing(wangbing, RTOS/Poincare Lab) via Libc-alpha
  Cc: Wangbing(wangbing,RTOS/Poincare Lab), Nixiaoming

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-27 10:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <efbc56f827194b87878392540b88fa12@huawei.com>
2022-09-27 10:40 ` [PATCH] dlsym: Add RTLD_PROBE for situation when dlsym only wants to probe a symbol but not use it Florian Weimer

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