public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "alex.ameen.tx at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/27977] Unexpected behavior when using DT_FILTER
Date: Sat, 19 Jun 2021 20:43:07 +0000	[thread overview]
Message-ID: <bug-27977-131-BFzsm7nPU0@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 #4 from Alex Ameen <alex.ameen.tx at gmail dot com> ---
Yeah my understanding based on the SunOS docs, which I only referenced because
GNU has basically no documentation on this feature, is the following :

Say you have a big library `libfoo.so' which you cannot modify or rebuild, for
the sake of argument let's say its a commercial 3rd party lib which is licensed
in a way that disallows the use of `objdump' to directly modify the symbol
table.

In our usage we want to link ONLY the symbol `foo' from `libfoo.so', but
nothing else because other global symbols in `libfoo.so' conflict with our own
implementations, listed later in the link. 

To ensure that only `foo' is linked we create a filter library `libfoomin.so'
with only `foo' in its symbol table, listing `libfoo.so' as a `DT_NEEDED'
entry.

The expected behavior is that regardless of what order `libfoomin.so' appears
in our link we will not have to worry about any other symbols except for `foo'
from being bound either during pre-linking or at runtime.

I admit that the use case is niche but this is precisely the situation I've
been trying to solve, making it is a useful feature if implemented as SunOS
described.

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

  parent reply	other threads:[~2021-06-19 20:43 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 [this message]
2021-06-19 20:44 ` alex.ameen.tx at gmail dot com
2021-06-28  9:33 ` fweimer at redhat dot com
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-BFzsm7nPU0@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).