public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/27977] Unexpected behavior when using DT_FILTER
Date: Mon, 28 Jun 2021 09:33:26 +0000	[thread overview]
Message-ID: <bug-27977-131-85fduVAmNK@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27977-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27977

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to A.Dmitrovsky from comment #3)
> (In reply to Florian Weimer from comment #2)
> > This came up when we fixed bug 16272: DT_FILTER does not actually filter
> > anything (it just reorders name resolution), so the observed glibc behavior
> > is more or less as expected.
> 
> Could you please elaborate on "it just reorders name resolution"? What is
> the intended use case for the --filter option? 

DT_NEEDED puts the referenced object after the current object in the search
scope. DT_FILTER puts it before it. I believe this is the only difference in
the current glibc implementation. There is simply no filtering. It has been
this way since basically forever, so if we want to change DT_FILTER now, we
would have to make it dependent on some additional flag.

But to be clear, I do not see us fixing this issue any time soon. Ideally, the
change in lookup behavior would also be reflect in GDB, so that it can find the
same symbol the process uses at run time. And I do not see a way to implement a
properly filtering DT_FILTER without significant changes to the search scope
data structures.

Unfortunately, dlmopen is quite buggy, too, but maybe it will fit your use case
once we implement RTLD_SHARED. My hunch is that this will be ready before a
filtering DT_FILTER. (I assume RTLD_LOCAL is too limited for your use case.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-06-28  9:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 10:16 [Bug dynamic-link/27977] New: " tdiff at yandex dot ru
2021-06-11 10:17 ` [Bug dynamic-link/27977] " tdiff at yandex dot ru
2021-06-16 15:39 ` alex.ameen.tx at gmail dot com
2021-06-18 15:48 ` fweimer at redhat dot com
2021-06-19 20:28 ` tdiff at yandex dot ru
2021-06-19 20:43 ` alex.ameen.tx at gmail dot com
2021-06-19 20:44 ` alex.ameen.tx at gmail dot com
2021-06-28  9:33 ` fweimer at redhat dot com [this message]
2021-06-28 18:37 ` tdiff at yandex dot ru
2023-11-13 10:25 ` sam at gentoo dot org

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=bug-27977-131-85fduVAmNK@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).